A reliable responsive email image has an explicit HTML width, a matching inline width, max-width: 100%, and height: auto. Tailwind can express the styling in source, but the final email should inline those rules and retain the width attribute for clients such as desktop Outlook.
A dependable responsive image pattern
For a 600-pixel content column, use:
<img
src="https://cdn.example.com/email/hero.jpg"
width="600"
alt="A project dashboard showing this weekās activity"
class="block h-auto w-full max-w-[600px] border-0"
style="display:block; width:100%; max-width:600px; height:auto; border:0;"
>
The width attribute gives older clients a concrete size. width:100% lets the image shrink, max-width prevents upscaling, height:auto preserves its ratio, and display:block removes the baseline gap below inline images.
If your build reliably inlines Tailwind, the class and style do not need to duplicate each other in source. The example shows the final intent explicitly.
Use retina assets without doubling layout width
For a sharp 300-pixel image, export at 600 physical pixels but render it at 300:
<img
src="https://cdn.example.com/email/[email protected]"
width="300"
alt="Revenue increased 18 percent this month"
style="display:block; width:100%; max-width:300px; height:auto;"
>
Do not omit the rendered width and hope the client interprets density metadata. Also avoid exporting everything huge: unnecessary dimensions increase download bytes and slow the message.
Choose image formats deliberately
JPEG suits photography and gradients. PNG works for transparency, UI screenshots, and simple graphics, though it can become large. GIF provides familiar animation support, but size and color limitations matter; make the first frame meaningful because not every client plays it.
Modern formats can be efficient, but email support is less uniform than browser support. Use them only after testing the clients important to your audience.
Write alt text for the imageās purpose
Ask what a reader loses when the image is blocked.
- A logo can use the company name.
- A product photo can identify the product and variant.
- A chart should summarize its conclusion, not say āchart.ā
- A decorative divider should use
alt="".
Never place essential instructions only inside an image. Live text is searchable, translatable, and accessible.
Make linked images safe
<a href="https://example.com/report" style="text-decoration:none;">
<img
src="https://cdn.example.com/email/report.jpg"
width="560"
alt="Open the September performance report"
style="display:block; width:100%; max-width:560px; height:auto; border:0;"
>
</a>
Use absolute HTTPS URLs for both src and href. Relative paths resolve against the mailbox, not your application.
Prevent Outlook surprises
Desktop Outlook may respect the width attribute more readily than modern CSS. Keep images inside table cells with known widths, and avoid relying on object-fit, aspect-ratio, transforms, or client-side cropping.
If an image must appear circular or heavily cropped, pre-crop the asset. Border radius may be ignored, so the original should still look acceptable as a rectangle.
For side-by-side cards, use table columns and a mobile stacking rule. Read responsive Tailwind email for a complete layout example.
Design for images-off mode
Many recipients initially see remote images blocked. The sender, purpose, headline, primary action, and important offer or status should remain clear without them. Do not make a hero the only place where a discount code, event date, or security instruction appears.
Optimize image weight
Resize source images before uploading, strip unnecessary metadata, and avoid sending several near-identical sizes. HTML size and image download size are separate concerns: Gmail clipping is driven by markup, while heavy images affect loading speed. Our Gmail 102KB guide covers markup optimization.
Common image mistakes
Using backgrounds for critical content. Support is harder, especially in Outlook.
Sending enormous originals. A width style does not reduce download bytes.
Omitting dimensions. Clients have less information while laying out the email.
Writing āimageā as alt text. Describe meaning or leave decorative alt empty.
Embedding base64 images. Support and message-size behavior are unreliable.
Frequently asked questions
Can Tailwind make email images responsive?
Yes. Utilities such as w-full, max-w-[600px], h-auto, and block express the pattern. Inline them for delivery and retain the width attribute.
What resolution should an email image use?
Export at the maximum physical dimensions needed. For a sharp 300-pixel render, a 600-pixel asset is a common 2x approach. Balance sharpness against weight.
Why does Outlook stretch my image?
Outlook may prioritize attributes and table geometry differently. Set a numeric width attribute, constrain the parent cell, and include inline sizing rules.
Should important text be baked into images?
No. Use live HTML text for essential content so it survives image blocking and remains accessible.
Share with friends