<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1822615684631785&amp;ev=PageView&amp;noscript=1"/>

How to include a personalized image in an email marketing campaign

GMass has many great options for mail merge personalization options, from simple mail-merge personalization to fallback values and even automatic first name detection. But did you know you can also include a personalized image for each recipient of your email marketing campaign?

The best practice for including a personalized image is to include an “img” tag in a column in your Google Docs spreadsheet. Let’s walk through an example of how to do that.

Example: Different Zodiac Signs

Below is an example of a Google Docs spreadsheet for a fictional business, Star Signs Essential Oils, which is offering a different Zodiac-themed essential oil to each customer based on his or her star sign. Here the personalized image links are included as values in one of the columns.
Example customer spreadsheet.
Example customer spreadsheet. Note the highlighted image links.
In those highlighted sections, note the “src=”https…” text in each customer’s ImageLink cell. These are links to images hosted somewhere online–ones that you have created for the purpose of this mail campaign. Each source link is different because each of these three people have a different zodiac sign (of course, in the case in which multiple people shared the same sign, they would all use the same src link for their image).

After using GMass to connect to your spreadsheet, the Compose window launches. In our fictional example, the Star Sign promotional email looks like this:

The outgoing email with the ImageLink used.
The outgoing email with the ImageLink used.

Note the presence of the text “{ImageLink}” in the center of the email. That is how GMass will know to replace that with the image indicated in the spreadsheet.

When your email is sent, each recipient will get the same text, but a unique image. For example, the recipient Brandon, who is an Aries, will receive the following email:

The email Brandon (the Aries) receives showing an Aries related image.
The email Brandon (the Aries) receives.

Ron, who is a Leo, will get the same text, but an entirely different personalized image:

The email Ron (the Leo) receives showing a Leo-related image.
The email Ron (the Leo) receives.

Finally, Jack, who is a Capricorn, will receive yet a different image:

The email Jack (the Capricorn) receives showing a Capricorn-related image.
The email Jack (the Capricorn) receives.

Other Use Cases

You can personalize emails using any images you want, of course, but just to give a sense for how this GMass feature could be used, here are some example cases:

  • Put a player’s name on the sports jersey or hat you are selling them.
  • Include a photo of the person taken as part of his or her interaction with your business. For example, at a tourist site in which souvenir photos are taken.
  • Include a different theme image depending on whether the recipient is male or a female, older or younger, from a particular country, or of some other demographic grouping that you could respectfully represent with an image.
  • Provide a photo of the branch of your business that is local to the recipient.
  • Show photos of specific products or services that each particular client is likely to be interested in based on customer data you already have.

Using Google Drive images

Google Drive is a great place to store images for your GMass campaigns. But… it takes a few steps. One, giving GMass permission to access Google Drive. Two, making sure your images have proper sharing permissions. And three, getting the actual image URLs (not the URLs to the images’ Google Drive page).

Click this link to give GMass permission to access your Google Drive images. We don’t ask for this permission by default; only in situations like this when we need it.

Now upload your images to Google Drive. Then select your images and give everyone with the link permission to view.

Now hit that Copy links button at the bottom of the popup.

Follow these steps to turn Google Drive’s string of URLs into actual images you can use.

  1. Open a new Google Sheet
  2. Click into cell A1 and hit paste.
  3. In cell A2, enter this formula: =SPLIT(A1,", "). Don’t forget the space after the comma that’s inside the quotes.
  4. Select everything in the second row. Click Copy.
  5. In cell A3, click Edit > Paste special > Values only.
  6. Select everything in the third row. Click Copy.
  7. In cell A4, click Edit > Paste special > Transposed.

Now we have every Google Drive image URL on its own line.

Delete rows 1, 2, and 3. That will leave you with just the URLs as they’re supposed to be for mail merge. That’s because Google didn’t give you direct links to the images — the links are to Google Drive pages featuring those images. And to mail merge the images, we need to grab the image links themselves.

In B1, type in the following formula: =MID(A1,33,(FIND("/",A1,33)-33)). We’re extracting the file ID from the string. We know it starts at the 33rd character and we’re accounting for the possibility it could be any length. Then drag that formula down to the rest of the rows.

It’s finally time to build mail merge links.

In C1, type the following =CONCATENATE("<img src=""https://drive.google.com/uc?export=view&id=",B1,""">") . You need all those double quotes in there because that’s how you escape quotation marks in this particular Google Sheets scenario. Now drag that formula down to the rest of the cells in the column.

Now copy everything in column C. Go to your main spreadsheet and paste those links in the right rows. Make sure to use Edit > Paste special > Values only.

The images will now be properly embedded in your emails.

Using Dropbox images

Much like Google Drive, Dropbox doesn’t like giving you the direct URLs to your images — they give you links to Dropbox pages featuring your images. So again, we need to extract the URLs.

And with Dropbox, you have to do this one at a time. Plus the URLs are really long. So it’s not the ideal solution.

Upload your images to Dropbox.

Right click on one of your images and chose Share then Share with Dropbox.

Make sure the permission is Anyone with this link can view. Then click Copy Link.

Now open an incognito browser window. (It needs to be an incognito window so you get the public URL.) Paste in the link. Then right-click and choose Copy Image Address.

Now paste that URL into your spreadsheet. And add <img src=" before the image URL and "> after.

Now repeat for the rest of your images.

Things to Keep in Mind

Although that is the basic idea, here are a few other points to keep in mind about personalizing images:

  • To keep things simple, I’ve just used a regular typed-in email for the example above. However, in many cases you will want to use the personalized image technique in the context of a custom HTML email. It works exactly the same way: just paste in your HTML into the Gmail compose window and then type in your {ImageLink} tag where you want the personalized image to appear. You can read more about How to use custom HTML in a Gmail compose window.
  • You can also make the image a link itself, of course. That would require using the personalized link technique I’ve blogged about before, but, in your spreadsheet, including the <img> tag within the <a> tag, like this:
    <a href="https://www.starsignessentialoils.com"> 
    <img alt="Aries Essential Oil" src="https://i.imgur.com/n3LQgc1.png">


If you need to send personalized images as part of a Gmail-based email marketing campaign, just host the individual images somewhere online and then include the full personalized image links, one for each recipient, in your Google Docs spreadsheet. Finally, include the personalization tag (such as {ImageLink} or whatever you’d like to call it, as long as it matches to the spreadsheet column) in the body of your email. It’s that easy!

Want more?

See why GMass has 300k+ users and 7,500+ 5-star reviews

Email marketing. Cold email. Mail merge. Avoid the spam folder. Easy to learn and use. All inside Gmail.


Download Chrome extension - 30 second install!
No credit card required
Love what you're reading? Get the latest email strategy and tips & stay in touch.

  1. By emailing myself using the G Mass button, I have created 5 templates which will be used in my email sequence. All the templates have images in them but I only see the image in the first email that I sent out (one that shows the subject) after that every email is not showing the images….. how do you fix this?

    1. Hi Agbish,

      Before “saving” the template to your account, please make sure to test email it first to ensure the image shows. You’ll have to email templates 2-5 to yourself again, making sure to send a test email before clicking the GMass button to ensure that the image is also saved.

  2. This works great, but the image in my test email is HUGE. I’ve reduced the size of the original file, but there is no change in the size of the image when I re-test.

    I emailed this question directly to you, but thought you might want to answer here too for the benefit of others.

    1. Hi Dave,

      We’ve answered your email directly. You may set the width of your image by adding width=”200″ prior to the closing bracket of your image code.


      img src="http:www.yourdomain.com/yourimage.jpg"
      img src="http:www.yourdomain.com/yourimage.jpg" width="200"

      1. I just tried to set the width of my file following your guidelines, but it’s not working … the code I used is (example)

        The image didn’t show up – what am I missing?

        1. Hi Chelsie,

          Does your spreadsheet have the image HTML code in the cell under the column with the header “example”?

          Your spreadsheet column should contain something like:

          Replace the () with html brackets

          (img src="yourimageurl.jpg" /)

      2. What do you mean?
        If i want to make sure the image size is correct, where do i add this width and number?
        And how do i know what size to add?
        How do i preview to make sure size is correct

        please explain

        1. Hi Letisha,

          You can set the width of an image as part of the img HTML code as seen in the example below:

          img alt="Aries Essential Oil" src="https://i.imgur.com/n3LQgc1.png" style="width:300px, height:auto"

  3. I am following all the instructions listed here and when I test the email, it either comes up as a full hyperlink or the image doesnt display, almost like it is a broken link. I have include images directly in the email before without having to hyperlink them. Any suggestions?

    1. Hi Todd,

      Please contact our support team at https://www.gmass.co/blog/how-to-get-support-from-the-gmass-team/ with a screenshot of your spreadsheet.

      1. Hi Marvin,
        Facing an issue as I’m drab-n-drop image into message area. The test email shows the image name with a broken link. I’ve performed this many times prior but seems it doesn’t work the same now. Suggestions?

  4. When adding an image in a GMass email, how do you wrap the text of the email around the image?

  5. Hi there!

    I’m not sure if I’m in the right place. I’m trying to use the gMASS module for emailing pet health records (personalized attachments) from Google Drive and Google Sheets but when we go to open the attachements while testing the software we’re unable to open them.

    I’ve watched the video and have scoured the website for further instruction but I’m stumped :/

    Help please?

    1. Hi Alexis,

      Please contact our support team (gmass.co/g/support) so we can assist you directly. Please include the campaign ID in your initial email so we can check right away.

  6. Where would be a place that we host images?
    So i can use this feauture please
    And how do i make sure image is in a certain area of the email?
    lets say above my signature …

    1. Hi Letisha,

      You can host your images in any image hosting service provider that allows direct linking. The recommended place since you have your own domain would be to host your images in your hosting. Offsite hosting can also be done such as imgur.com

  7. One thing I would like to say is the fact that before obtaining more laptop memory, look at the machine within which it can be installed. If the machine is definitely running Windows XP, for instance, a memory threshold is 3.25GB. Setting up a lot more than this would easily constitute just a waste. Make sure that one’s motherboard can handle the particular upgrade amount, as well. Great blog post.

  8. If I dont have a website to store images on. Is there a way to pull these images right out of a folder in my Drive??

  9. I have tried so many times, but I past my { } link and no image comes through. The text links come through just fine. But the image doesn’t show up. I can see the image in my google sheets, but it never copies through to the email.

  10. Hello, I tried this method to add personalized images to the GMass email but the image is not displaying. Instead it has an empty icon shows, like a picture is supposed to be there but it didn’t load. I am linking images from my Google Drive. Would that be the problem? TIA

  11. Hello there.
    I used to use Sendinblue to send custom images and links to my clients, but they don´t have this functionalitty anymore.
    Do you know any email plataforms that let me send custom images?
    Thanks a lot

    1. Hi Fernando,

      If you’re sending campaigns within your account’s sending limit, you can use the above article to send your personalized emails/links without the need for a third-party SMTP service. If you would rather send using a third-party SMTP, we recommend SendGrid which is the same SMTP service provider we maintain an account with that is compatible with GMass.

  12. If we have an image placed directly in a spreadsheet cell (not hovering over the cell, but actually within the cell, will that image carryover to the email template? I’m having trouble accomplishing that and wonder if it is required to have to use a link to the image instead? THanks,

  13. Great goods from you, man. I’ve understand your stuff previous to and you are just too wonderful. I really like what you have acquired here, certainly like what you’re stating and the way in which you say it. You make it enjoyable and you still care for to keep it smart. I can not wait to read far more from you. This is actually a tremendous site.

  14. Together with the whole thing which appears to be building throughout this subject matter, your perspectives are actually rather refreshing. Nonetheless, I am sorry, because I do not subscribe to your whole strategy, all be it exciting none the less. It looks to us that your remarks are not totally rationalized and in simple fact you are yourself not really totally confident of the point. In any event I did appreciate reading it.

  15. Valuable information. Lucky me I found your site by accident, and I’m shocked why this accident did not happened earlier! I bookmarked it.

  16. Thanks for making me to attain new concepts about pc’s. I also have belief that one of the best ways to keep your laptop in primary condition is a hard plastic-type material case, or even shell, that suits over the top of the computer. These kinds of protective gear usually are model targeted since they are manufactured to fit perfectly within the natural housing. You can buy all of them directly from owner, or from third party sources if they are readily available for your laptop, however not all laptop could have a shell on the market. Just as before, thanks for your suggestions.

  17. This article is a refreshing change! The author’s unique perspective and perceptive analysis have made this a truly fascinating read. I’m thankful for the effort he has put into creating such an informative and mind-stimulating piece. Thank you, author, for offering your expertise and stimulating meaningful discussions through your outstanding writing!

Leave a Reply to Marvin Quinsaat Cancel reply

Your email address will not be published. Required fields are marked *

Start your free trial of GMass now

Install in 30 seconds — no credit card or sign up form required

Try GMass for free Then check out the quickstart guide to send your first mail merge email in minutes!


Share This