How to Add Personalized Images to Mailchimp Campaigns

Mailchimp handles text personalization well. *|FNAME|* in a subject line has been standard practice for years, which is precisely the problem - subscribers have stopped noticing it.

The images, meanwhile, are identical for everyone. Same header, same banner, same offer graphic, whether you are subscriber one or subscriber fifty thousand.

You can change that without a developer, and without making an image per person. Here is how it works in Mailchimp specifically, including the one editor quirk that catches people out.

The idea

An image in an email is a URL. Mailchimp fetches whatever is at that address when the email is opened.

If that URL is a fixed file, everyone sees the same picture. If it points at an image generator with the subscriber's details as parameters, everyone sees their own:

https://media.okzest.com/img?c=YOUR-COMPANY-ID&i=YOUR-DESIGN-ID&name=Sarah

Mailchimp will substitute merge tags inside a URL exactly as it does in body text, so you replace the value with a tag:

https://media.okzest.com/img?c=YOUR-COMPANY-ID&i=YOUR-DESIGN-ID&name=*|FNAME|*

At send time Mailchimp swaps *|FNAME|* for each subscriber's first name, and the image renders with it. One image tag, one template, a different picture per person.

Step by step

1. Build the image template

In OKZest, create a design at your target size - 600 x 300 pixels suits most Mailchimp header images. Add your background, logo and brand colours in the editor.

Then add a dynamic text layer where the personalization should appear and give it a field name, name being the obvious choice. That is the part that changes per subscriber. Add more if you need them - company, city, product.

Design it around a long name rather than a short one. "Bartholomew" needs more room than "Jo", and the layout has to hold both.

2. Get the image URL

OKZest gives you a single URL with your fields as parameters:

https://media.okzest.com/img?c=YOUR-COMPANY-ID&i=YOUR-DESIGN-ID&name=SAMPLE

c is your company ID, the same for every design in your account. i identifies this design. Anything after them is a dynamic layer.

Paste it into a browser and change SAMPLE a few times. The image should regenerate each time. Confirm that before going near Mailchimp - it separates template problems from Mailchimp problems.

3. Swap in Mailchimp's merge tags

Mailchimp's tag format uses asterisks and pipes rather than curly braces:

Field Merge tag
First name *|FNAME|*
Last name *|LNAME|*
Email address *|EMAIL|*
Custom audience field *|MMERGE3|* or your own tag name

So the URL becomes:

https://media.okzest.com/img?c=YOUR-COMPANY-ID&i=YOUR-DESIGN-ID&name=*|FNAME|*

Always add a fallback. Mailchimp lets you set a default inside the tag using a colon:

*|FNAME:there|*

If the subscriber has no first name stored, the image reads "there" rather than rendering a blank space in the middle of your header. This is the single most important step in the whole process, and the one most often skipped. Every Mailchimp audience has subscribers with missing name data.

For custom fields, check the exact merge tag under Audience → Settings → Audience fields and *|MERGE|* tags. Mailchimp assigns tags like *|MMERGE3|* by default, but you can rename them to something readable.

4. Add it to your campaign using a Code block

This is the Mailchimp-specific detail worth knowing in advance.

Mailchimp's standard Image block expects an uploaded file or a Content Studio asset. It does not reliably let you paste an arbitrary URL containing merge tags. If you try to force it, you will usually find the merge tags are not processed.

Use a Code block instead (called Code in Classic Builder, and available as an HTML or Code content block in the newer editor). Drag it into your layout and paste a standard image tag:

<img src="https://media.okzest.com/img?c=YOUR-COMPANY-ID&i=YOUR-DESIGN-ID&name=*|FNAME:there|*"
     alt="A message for *|FNAME:there|*"
     width="600"
     style="display:block; width:100%; max-width:600px; height:auto;" />

Three details in that tag matter:

  • alt text with the merge tag in it, so the message survives when images are blocked - which is Outlook's default.
  • An explicit width, so the image renders predictably across clients.
  • display:block and max-width, which keeps it responsive on mobile without Mailchimp's default image styling interfering.

5. Preview with real subscribers

Use Preview → Enter preview mode, then switch to a real subscriber from your audience rather than the default placeholder data. You will see the image render with their actual name.

Check three specific cases:

  • The longest name in your audience. Sort by name length if you can, or pick someone you know has a long one.
  • A subscriber with no first name. Confirm your :there fallback appears rather than a gap.
  • A name with an apostrophe or accent - O'Brien, Müller. These are the ones that break URLs.

Then send yourself a test and open it in Gmail and on your phone.

The gotcha nobody mentions: special characters

Mailchimp does not URL-encode merge tag values when it substitutes them. Most of the time this does not matter, because most names are plain letters.

It matters when a value contains a character with meaning in a URL - an ampersand, a hash, a question mark. A company name like "Acme & Sons" will break the URL at the ampersand, and the image will fail to load for that subscriber.

Two practical responses:

Clean the data. If you are passing company names or free-text fields, check for ampersands and special characters in your audience before sending. A find-and-replace in the export is usually quicker than any technical fix.

Prefer simple fields. First names are almost always safe. Free-text fields entered by subscribers are the risky ones.

Names with apostrophes and accented characters generally survive, but they are worth testing rather than assuming.

Where to use it in Mailchimp

Welcome automations. A header greeting each new subscriber by name, sent when engagement is highest.

Abandoned cart (Mailchimp's ecommerce automations). Show the actual product left behind rather than a generic reminder.

Re-engagement campaigns. "We miss you, Sarah" reads differently as a designed graphic than as body copy.

Date-based automations. Birthdays and anniversaries, where the personalization is the entire point of the email.

Regular newsletters. Worth testing, though the effect is usually smaller here - habitual readers are less influenced by a name in the header than someone receiving their first email from you.

Frequently asked questions

Can I use merge tags in an image URL in Mailchimp? Yes. Mailchimp substitutes merge tags inside URLs the same way it does in body text. The practical constraint is that you generally need a Code block rather than the standard Image block, because the Image block expects an uploaded file.

Why is my merge tag showing as literal text in the image? Usually because it is in an Image block rather than a Code block, so Mailchimp is not processing it. Move the image tag into a Code block. If it persists, check the merge tag name matches exactly what is listed under Audience fields.

What is the fallback syntax in Mailchimp? A colon inside the tag - *|FNAME:there|* renders "there" when no first name is stored. Always set one.

Do I need a developer? No. Building the template is visual editing and adding it to Mailchimp is pasting one image tag into a Code block. The only "code" is that tag.

Will this work with Mailchimp's automations as well as regular campaigns? Yes. Merge tags behave the same in automations, so the same image tag works in welcome series, abandoned cart, and date-based sends.

Does it affect deliverability? No. It is a standard image URL and Mailchimp treats it like any other image. Normal practice still applies - a sensible text-to-image ratio, an authenticated sending domain, and meaningful alt text.

What happens with subscribers who have no first name? With a fallback set, they see your default wording. Without one, they see a blank space where the name should be. This is why the fallback matters.

Can I personalize with custom audience fields? Yes. Find the exact merge tag under Audience → Settings → Audience fields and *|MERGE|* tags, and use it in the URL the same way as *|FNAME|*.

Does this work in other email platforms? Yes - anything that supports custom image URLs and merge tags. Only the tag syntax changes. We have a walkthrough for Klaviyo, which uses {{ first_name }} instead.

Try it on your next Mailchimp send

Build one template with a single name field, put the image tag in a Code block in your next welcome email, and compare the click-through rate with your previous send. About ten minutes of setup.

OKZest generates personalized images from one template as a URL - a different image for every subscriber, rendered when they open the email. It works with Mailchimp and any other platform that accepts a custom image URL, and connects through Zapier for automation.

Create a free account, no credit card required.


Related reading: personalized images in Klaviyo, put every recipient's name inside your email image, top Mailchimp integrations.