Dynamic image tags for email campaigns, explained
Every dynamic image in email comes down to one line of HTML. It looks ordinary: an image tag, maybe wrapped in a link. But inside the image address sits a small instruction set that tells a rendering service what to draw for each subscriber. Get that line right and dynamic images just work. Get it slightly wrong and they fail silently.
This is a practical look at dynamic image tags for email campaigns: how they're built, what goes into the URL, and the merge tag syntax for the platforms most teams use.
The anatomy of a dynamic image tag
A typical Alterable embed has two parts. The outer part is a link, pointing to a click-tracking address that forwards the subscriber to your landing page. The inner part is the image itself, pointing to an address like this:
https://next.alterable.com/dynamic-images/YOUR-IMAGE-ID.png?firstname=MERGE_TAG
Break that down. The base address identifies which image design to render. The .png tells the email client it's an image. Everything after the question mark is a parameter: a name (firstname) and a value. When you paste the embed into your ESP, you replace MERGE_TAG with the platform's merge tag, so each subscriber's value is written into their own copy of the URL at send time.
When the email is opened, the client requests that URL, and Alterable draws the image using the values it receives, plus anything it can resolve at that moment, like the time or weather.
Multiple parameters
Images often need more than one value. A rewards banner might take a name, a points balance, and a coupon code. Parameters are joined with an ampersand:
...png?firstname=VALUE&points=VALUE&code=VALUE
In HTML, that ampersand is sometimes written as &, which is fine. Email editors handle both. What matters is that each parameter name matches the variable name in your image design exactly.
Merge tag syntax by platform
Here's how the first-name parameter looks in the most common email platforms. Custom fields follow the same pattern with their own names.
- Mailchimp: ?firstname=*|URL:FNAME|* (the URL: modifier encodes spaces and special characters)
- Klaviyo: ?firstname={{ first_name|default:'there' }}, and custom properties as {{ person.city }}
- HubSpot: ?firstname={{ contact.firstname }}
- Brevo: ?firstname={{ contact.FIRSTNAME }}
- ActiveCampaign: ?firstname=%FIRSTNAME%
- Kit: ?firstname={{ subscriber.first_name }}
Check your own platform's field list for exact tags, because custom fields vary by account. Alterable's setup guides for each platform list the specifics.
The rules that keep dynamic image tags working
Match names exactly
Parameter names must match your design's variables, and merge tags must match your platform's fields, including capitalization. In Klaviyo, a property saved as "City" won't respond to "city." There's no error. The value just arrives empty.
Encode values
URLs don't like spaces, accents, ampersands, or apostrophes. A name like "Anne-Marie O'Neil" can break the address if it isn't encoded. Mailchimp's URL: modifier handles this, and Klaviyo has a urlencode filter. Where your platform encodes automatically, you're covered.
Always set defaults
Defaults can live in two places: in the merge tag (Klaviyo's default filter) and in the image design itself. Alterable lets you set a fallback value for each variable, so a missing name becomes "there" or disappears gracefully rather than leaving a gap.
Paste into an HTML block
Regular image blocks in most editors only accept a fixed file or plain URL and won't let merge tags inside it. Use your platform's HTML or Code block for the full embed.
Leave the rest alone
Don't add width or height attributes that fight the image's real proportions, and don't strip the link. The link is how clicks are tracked and routed.
Identifiers for evergreen and stateful content
Some dynamic content needs to recognize the same subscriber across opens. An evergreen countdown has to keep the same deadline each time a person opens. A map might need to stay consistent. For these, the tag carries a unique subscriber identifier, such as Mailchimp's *|UNIQID|*, as a uid parameter.
Use a platform-generated ID rather than an email address. It does the job without putting personal data into an image URL.
Testing dynamic image tags
Test sends are where people panic. Many platforms don't fill contact-specific merge tags in tests, so the URL arrives with the raw tag in it and the image looks broken. Preview with real contacts, or send the live campaign to a segment containing only you and your team.
Test four cases: a normal contact, one with missing data, one with a long or accented name, and an open on a phone.
Why Alterable makes the tag part easy
Alterable generates the embed for you with every parameter already named, so all you do is drop in your platform's merge tags. The same tag format works across dynamic images, countdown timers, product blocks, store maps, surveys, and scratch cards, which means your team learns it once. Everything is available on the free plan (10,000 impressions a month, unbranded).
Once you've built one working dynamic image tag, you've built them all. Start with a simple name-in-image banner on Alterable's free plan at alterable.com, get it working in your ESP, and reuse the pattern everywhere.
