Skip to content
Digital Inspiration DocsDigital Inspiration Docs

An image you add in the email editor is the same in every email. To show each person a different image, put the image’s link in your sheet and add an Embed Image marker to the message of your email.

Rosa is a real estate agent. This week she has found a home for each buyer on her list. She wants every email to show a photo of that buyer’s home, right below the address and price. Angus should see the house on Oak Street and Daniel the flat near the park, all from the same campaign.

First Name Email Address Home Photo
Angus angus@gmail.com https://image.com/oak-street.jpg
Daniel daniel@gmail.com https://image.com/park-flat.jpg
Sofia sofia@gmail.com https://image.com/hill-road.jpg

Each image needs a link. The link can be a public link on the web, or the link of a picture in your Google Drive.

  1. Add a column titled Home Photo to your mail merge sheet.

  2. For a picture on the web, open the picture in your browser, right-click the picture and choose Copy Image Address. Paste the link in the buyer’s row.

    Browser right-click menu on an image with Copy Image Address highlighted
    Right-click the image and copy its address.
  3. For a picture in Google Drive, right-click the file, choose Share and then Copy link. Paste the link in the buyer’s row. You don’t need to change who the file is shared with.

A link to a web image usually ends in .png, .jpg or .gif. If the link doesn’t, the link may open a web page instead of the image. The image then won’t show in the email.

If your pictures aren’t online yet, upload them to your Google Drive, to an image host such as Imgur or Imgbb, or to your own website.

  1. Go to Extensions > Mail Merge with Attachments > Open Mail Merge, open your campaign and move to the Template step.

  2. In the Message box, type an Embed Image marker on a line of its own, where the picture should go.

    Hi {{First Name}},
    I think you'll like this one. It came on the market yesterday.
    {{Embed Image, {{Home Photo}}, width=500}}
    Shall I book a viewing for Saturday?
    Rosa
  3. Click Send Test Email and send the email to yourself. Check that the picture shows and is the right size.

  4. Go to the Save & Run step and click Send Emails.

Mail Merge shows each row’s picture 500 pixels wide, so Angus sees the house on Oak Street and Daniel sees the flat near the park. If a row’s Home Photo cell is empty, Mail Merge still sends the email without an image.

The Embed Image marker works in the visual editor, a Gmail draft, HTML, Markdown and a Google Docs template. A plain text email can’t show pictures.

{{Embed Image, link or column, width=500, align=center}}
You want Marker
A different picture for each row {{Embed Image, {{Home Photo}}, width=500}}
The same picture for everyone, like a logo {{Embed Image, https://example.com/logo.png, width=160}}
A picture found by a pattern, like a product code {{Embed Image, https://example.com/products/{{SKU}}.jpg}}
A picture in the middle of the email {{Embed Image, {{Home Photo}}, width=400, align=center}}
A description for readers who can’t see the picture {{Embed Image, {{Home Photo}}, alt=Front of the house}}
A picture in your Drive, by name, for everyone {{Embed Image, Logos/willow-lane.png, width=160}}
Option What it does If you leave it out
width Width in pixels. The height follows, so the picture keeps its shape. The picture’s own size
height Height in pixels. Set width or height, not both, or the picture may stretch. Follows the width
align left, center or right Left
alt A short description, shown when the picture can’t load No description

A photo from a phone is often 4,000 pixels wide, much wider than an email. Set width=500 or less so the photo fits on a phone screen.

A picture in Google Drive has no public link, so Mail Merge handles it differently from a web image.

Picture on the web Picture in Google Drive
How it gets into the email The email links to it Mail Merge attaches a copy inside the email
Email apps that hide pictures The reader clicks Download pictures The picture shows right away
If you delete the picture later Sent emails show a broken image Sent emails keep their copy
Sharing settings The link must be public No change needed. Your account reads the file.

Good uses for Drive pictures are staff photos, signed certificates saved as images, and anything you don’t want on a public website.

The cell can hold a pasted Drive link or a file chip. If the cell lists several files, Mail Merge uses the first one. The file must be an image, like a JPG or PNG. Resize large photos before you upload them, because each attached picture adds to the size of the email.

To check that every web link works before you send, add a Preview column and use the IMAGE function, like =IMAGE(C2). If the cell stays empty, that link won’t show in the email either.

Google Sheet with image URLs, img tags and a Preview column that uses the IMAGE function to show each picture
The IMAGE function shows each picture right in the sheet.

Use the column with the link in your marker, not the Preview column. The preview doesn’t work for Drive links, so check those with a test email.

Before the Embed Image marker, the way to send unique images was a column of HTML image tags. This method still works. It’s useful when you want your own HTML around the picture.

  1. Click the first cell of an empty column, next to Home Photo.

  2. Paste this formula. The formula turns every link in column C into an image tag, titles the column Image Tag, and fills in new rows by itself.

    =ArrayFormula(
    IF(ROW(C:C)=1, "Image Tag",
    IF(ISBLANK(C:C), "",
    SUBSTITUTE("<img src='URL' style='max-width:500px' />", "URL", C:C)
    )
    )
    )

    If your links are in a different column, change C:C to that column’s letter.

    Google Sheets ARRAYFORMULA that turns image URLs in column C into HTML img tags in an Image Tag column
    One formula fills the Image Tag column for every row.
  3. In the email template, type {{Image Tag}} where you want the picture.

The email shrinks images wider than 500 pixels to fit. Smaller images keep their size. This method needs public image links. It doesn’t work with pictures in Google Drive.

In the HTML editor you can skip the extra column and write the tag in the template, like <img src="{{Home Photo}}" width="500" />.

  • Send yourself a test email and open the test email to check that the image shows and is the right size.
  • Each time someone opens the email, the email loads web images from the host. Don’t delete the images or change their links after you send. Otherwise, the emails show a broken image.
  • Some email apps, like Outlook, hide web images until the reader clicks Download pictures. Gmail shows them right away.
  • The Embed Image marker works in the message only. Mail Merge removes the marker from the subject and from plain text emails.
  • To give each person a QR code or a barcode, use Embed QR Code or Embed Barcode. You don’t need an image link.
  • To send each person a file they can download, instead of an image in the body, attach a different file to each email.
Section titled “Invalid attachment - Embed Image needs a link in the column”

The cell holds something that isn’t a link, like a file name. Paste the picture’s web link or its Drive link in the cell, then clear that row’s Mail Merge Status cell and run the campaign again.

The Drive link in the cell points to a file that isn’t a picture, like a PDF. Link to a JPG, PNG or GIF. To send the PDF, attach the PDF.

The web link doesn’t open the image itself, or the link isn’t public. Open the link in a private browser window. You should see only the picture.

Some image services put commas in their links. If the link has a comma, put the merge field in quotes so Mail Merge doesn’t split the link at the comma: {{Embed Image, "{{Home Photo}}", width=500}}.

The Home Photo cell is empty for that row, or the column title in the marker is misspelled.