Base64 images in HTML email: what renders and what gets stripped

You encoded a logo to a data URI, dropped it into an <img> tag, sent the test email — and half your test inbox shows a blank box. This guide explains which clients render Base64 data URIs, which strip them, and which of the three embedding paths (data URI, CID attachment, hosted URL) to use where, with the working pattern for the transactional APIs most developers actually send through.

Three ways an image travels in email

Everything that looks like an "embedded image" in email is one of three mechanisms, and mixing them up is the root of most blank-image bugs:

MechanismHow it worksReliability
Hosted URL <img src="https://cdn.example.com/logo.png"> — the HTML references a file on your server. The client downloads it when the recipient allows remote images. Highest. Renders in every modern client once images are enabled; you control the bytes, and swapping the file updates all sent mail.
CID attachment The image rides in the MIME structure as an attachment with a Content-ID; the HTML references it as <img src="cid:logo">. No external request, no paperclip icon when Content-Disposition is inline. High. Survives Gmail and Outlook desktop. Requires the sending path to support MIME attachments — i.e. an API or library, not a paste-into-editor workflow.
Data URI The bytes sit inside the HTML itself: <img src="data:image/png;base64,iVBOR...">. Fully self-contained, zero requests, zero server involvement. Partial. Rendered by Apple Mail, Thunderbird and Yahoo Mail; stripped by Gmail; not rendered by Outlook on Windows. Works where it works, and silently disappears where it does not.

The data URI's privacy property is real and worth having: the image is processed and embedded without ever touching a server. The rest of this guide is about where that property survives delivery.

Client-by-client support matrix

Client behavior is consistent enough to plan around, and two clients cause essentially all the pain:

ClientData URI in <img>What actually happens
Gmail (web, Android, iOS)❌ StrippedThe sanitizer removes data URIs from src before rendering — the image area is blank. No workaround in the HTML itself.
Outlook (Windows desktop)❌ Not renderedThe Word rendering engine does not display data URIs in message bodies. Blank box or broken-image glyph.
Outlook.com / new Outlook⚠️ InconsistentBehavior varies by version and sanitize path; do not rely on it.
Apple Mail (macOS, iOS)✅ RendersData URIs display normally, including in signatures.
Thunderbird✅ RendersDisplays data URI images in message bodies.
Yahoo Mail✅ Generally rendersData URIs display, though image blocking on remote content does not apply — the URI is already in the message.

Two consequences follow from the two red rows. First, a data URI must never be the only copy of an image in anything sent to unknown recipients — always ship meaningful alt text. Second, if the audience is Gmail-and-Outlook-heavy (which is most B2B audiences), choose hosted or CID from the start instead of debugging stripped images afterwards.

When the data URI is actually the right call

The matrix is not an argument against data URIs — it is an argument for matching the mechanism to the audience:

Working patterns per provider

Transactional APIs give you the MIME level, which is where CID attachments live. Each of these has a dedicated guide with full payloads:

The mechanism behind every bullet is the same one: when the target is Gmail or Outlook, move the image out of the HTML and into the MIME structure (CID) or onto a server (hosted URL).

Size math and message limits

Base64 encodes three bytes into four characters — about a 33% overhead — and in email that weight lands on every recipient, in every mailbox, on every send:

The signature special case

Signatures deserve their own caution because they fail differently from campaigns:

Frequently asked questions

Do Base64 data URI images work in HTML email?

Only in some clients. Apple Mail, Thunderbird and Yahoo Mail render them; Gmail strips them from the HTML and Outlook on Windows does not display them. Treat a data URI as a progressive enhancement for a known-permissive audience, with real alt text behind it.

Why does Gmail remove Base64 images?

Gmail sanitizes inbound HTML and blocks data: URIs in img tags as a security measure, so the image area renders blank. There is no markup-level workaround — the image has to arrive by another mechanism.

What is the reliable way to embed an image in email?

A hosted HTTPS image (works everywhere images are enabled) or a CID inline attachment (raw Base64 in the MIME structure referenced as cid:name). Both survive Gmail and Outlook desktop.

When is a data URI the right choice?

When recipients are known to use permissive clients, when no hosting or attachment API is available, or when zero-upload handling is the point — internal tooling that must not send user images to any server. Always ship alt text.

How much bigger does Base64 make the email?

About a third. A 200 KB image becomes a ~270 KB string that every recipient downloads on every send. Downscale to rendered size, encode, and verify with a size calculator.

Do signature images work as data URIs?

Apple Mail: yes. Gmail: the ~10,000-character signature limit usually rejects them first. Outlook desktop: the Word engine does not render them. Cross-client safe means a small hosted image.

Where can I encode an image without uploading it?

The image to Base64 converter and the data URI generator on this site run entirely in the browser — the file is read locally with the FileReader API and never leaves the device.