Email Marketing Images: Personalize at Scale
The first personalized email image I saw stopped me mid-scroll. My name was on the banner. Not typed text that could have been anyone's—actually rendered into the image itself.
I clicked. Of course I clicked.
That's what personalized email images do. They break through the noise of generic marketing by making each recipient feel like the message was made just for them. And with image generation APIs, you can create them at scale without touching a design tool.
Here's how to add personalized images to your email campaigns.
Why personalized images workWhy Personalized Images Work
We're wired to notice our own names. It's called the cocktail party effect—even in a crowded room, you hear your name when someone says it.
The same psychology applies to email. When someone sees their name in an image (not just text), it signals effort. It says "this was made for you."
The data backs this up:
- Personalized emails generate 6x higher transaction rates
- Images with names have 29% higher click-through rates
- Subject line personalization alone lifts open rates 50%
Imagine combining all three: personalized subject, personalized text, and personalized images.
Types of personalized email imagesTypes of Personalized Email Images
Name based personalizationName-Based Personalization
The simplest version. Put the recipient's name in the header image:
- "Hey Sarah, your exclusive offer awaits"
- "Mike's Monthly Recap"
- "Welcome to the team, Lisa!"
Works for welcome emails, birthday campaigns, and VIP communications.
Data driven personalizationData-Driven Personalization
Pull in more than names:
- Account statistics (purchases, points, status)
- Usage metrics (minutes used, articles read)
- Geographic data (city, weather)
- Historical data (anniversary dates, last purchase)
SaaS companies use this for usage reports. E-commerce uses it for purchase history. Fitness apps show workout stats.
Offer based personalizationOffer-Based Personalization
Different offers for different segments:
- Discount amounts based on customer value
- Product recommendations based on history
- Expiring offers based on activity
Each recipient sees an image with their specific offer, not a generic one.
Visual personalizationVisual Personalization
Include the recipient's own content:
- Profile photos in welcome emails
- Their uploaded images in recap emails
- Company logos for B2B communications
This level of personalization feels bespoke.
Setting up personalized email imagesSetting Up Personalized Email Images
Let's build a working system from scratch.
Step 1 design your templateStep 1: Design Your Template
Create an email header template with editable fields. Common elements:
| Field | Type | Example |
|---|---|---|
| recipient_name | Text | "Sarah" |
| offer_amount | Text | "25% OFF" |
| expiry_date | Text | "Ends Sunday" |
| product_image | Image | URL to product |
| background_color | Color | "#FF5733" |
Build the template in Imejis.io and mark each field as editable. Note your template ID.
Step 2 prepare your email dataStep 2: Prepare Your Email Data
Your email platform has recipient data. Map it to your template fields:
// Example data from your email platform
const recipient = {
email: 'sarah@example.com',
firstName: 'Sarah',
discount: 25,
loyaltyTier: 'Gold',
lastPurchase: '2026-01-15',
};
// Map to template fields
const templateData = {
recipient_name: recipient.firstName,
offer_amount: `${recipient.discount}% OFF`,
expiry_date: 'Ends Sunday',
tier_badge: recipient.loyaltyTier,
};Step 3 generate the imageStep 3: Generate the Image
Call the API to generate a personalized image:
async function generateEmailImage(recipientData) {
const response = await fetch(
'https://render.imejis.io/v1/your-email-template-id',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.IMEJIS_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
recipient_name: recipientData.firstName,
offer_amount: `${recipientData.discount}% OFF`,
expiry_date: 'Ends Sunday',
}),
}
);
const result = await response.json();
return result.url;
}Step 4 insert into your emailStep 4: Insert into Your Email
The generated URL goes into your email HTML:
<img
src="https://cdn.imejis.io/images/abc123.png"
alt="Hey Sarah, your 25% discount awaits"
width="600"
height="200"
/>Most email platforms support dynamic image URLs through merge tags or liquid syntax.
Integration with email platformsIntegration with Email Platforms
MailchimpMailchimp
Use merge tags in your image URL:
<img src="https://your-api.com/email-image?name=*|FNAME|*&discount=*|DISCOUNT|*" />Set up a server-side endpoint that calls the image API and redirects to the generated image.
KlaviyoKlaviyo
Klaviyo supports dynamic images natively. Use their template syntax:
<img src="https://your-api.com/email-image?name={{ first_name }}&offer={{ offer_code }}" />SendgridSendGrid
With SendGrid's dynamic templates:
<img src="https://your-api.com/email-image?name={{firstName}}&discount={{discountPercent}}" />BrazeBraze
Braze uses Liquid for personalization:
<img src="https://your-api.com/email-image?name={{${first_name}}}&city={{${city}}}" />Any platformAny Platform
The pattern is the same everywhere:
- Create an endpoint that accepts personalization parameters
- Use those parameters to call the image API
- Return or redirect to the generated image URL
- Reference that endpoint with your platform's merge tags
Building the server endpointBuilding the Server Endpoint
Most email platforms can't call external APIs directly. You need an intermediary:
// Vercel/Next.js API route
export default async function handler(req, res) {
const { name, discount, offer_code } = req.query;
// Validate inputs
if (!name) {
return res.redirect('/images/default-email.png');
}
// Generate personalized image
const response = await fetch(
'https://render.imejis.io/v1/your-email-template-id',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.IMEJIS_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
recipient_name: name,
offer_amount: discount ? `${discount}% OFF` : 'Special Offer',
offer_code: offer_code || '',
}),
}
);
const data = await response.json();
// Redirect to generated image
res.redirect(302, data.url);
}This endpoint becomes your image source in emails.
Caching for performanceCaching for Performance
Email opens happen in bursts. When you send 10,000 emails, many will open within minutes. Without caching, you'll hit rate limits and slow down image loads.
Cache by content hashCache by Content Hash
const crypto = require('crypto');
function getCacheKey(params) {
return crypto
.createHash('md5')
.update(JSON.stringify(params))
.digest('hex');
}
// Check cache before generating
const cacheKey = getCacheKey({ name, discount, offer_code });
const cached = await cache.get(cacheKey);
if (cached) {
return res.redirect(302, cached);
}
// Generate and cache
const imageUrl = await generateImage(params);
await cache.set(cacheKey, imageUrl, 86400); // Cache for 24 hours
res.redirect(302, imageUrl);Use a cdnUse a CDN
Put your image endpoint behind Cloudflare or similar. The CDN caches responses, so identical requests don't hit your server.
Handling edge casesHandling Edge Cases
Missing dataMissing Data
Some recipients won't have all fields. Handle gracefully:
const templateData = {
recipient_name: firstName || 'Friend',
offer_amount: discount ? `${discount}% OFF` : 'Special Offer',
city: city || 'Your City',
};Special charactersSpecial Characters
Names with accents, apostrophes, or unicode need proper encoding:
const safeName = encodeURIComponent(name.replace(/[<>]/g, ''));Very long namesVery Long Names
A 30-character name will break layouts designed for 10 characters. Truncate:
const displayName = name.length > 15
? name.slice(0, 12) + '...'
: name;Email client limitationsEmail Client Limitations
Some email clients block external images by default. Always include:
- Descriptive alt text
- A fallback for blocked images
- Clear CTA that works without images
Measuring resultsMeasuring Results
Track these metrics for personalized vs. generic images:
| Metric | How to Measure |
|---|---|
| Click-through rate | Link clicks / opens |
| Conversion rate | Purchases / clicks |
| Revenue per email | Total revenue / sends |
| Image load rate | Successful loads / opens |
A/B test personalized images against generic ones. Most campaigns see 15-30% improvement in click-through rates.
FaqFAQ
Does personalization hurt email deliverabilityDoes personalization hurt email deliverability?
No. Personalized images don't affect spam scores. If anything, higher engagement from personalization improves your sender reputation.
How fast do personalized images loadHow fast do personalized images load?
With proper caching, under 200ms. First loads may take 1-2 seconds while the image generates. Cache aggressively to minimize this.
Can i personalize images for millions of recipientsCan I personalize images for millions of recipients?
Yes, but use caching wisely. If you have segments (Gold members all get similar images), cache at the segment level, not individual level.
What about email clients that block imagesWhat about email clients that block images?
About 40% of email clients block images by default. Always include alt text and ensure your email works without images. Personalized images are an enhancement, not a requirement. Check our template library for designs that work with or without images loading.
How do i test personalized images before sendingHow do I test personalized images before sending?
Most email platforms have preview modes. Send test emails to yourself with different data combinations. Check our guide on automating social media images for similar testing approaches that apply to email.
Start personalizingStart Personalizing
You don't need to personalize every email. Start with high-value campaigns:
- Welcome emails (first impression matters)
- Birthday/anniversary campaigns (natural personalization fit)
- Re-engagement emails (extra effort to win them back)
- VIP communications (reward your best customers)
Pick one campaign. Create one template. See what happens to your click rates.