Base64 Image in Gmail Signature Not Working? Why & the Fixes
You built a signature with an embedded logo — <img src="data:image/png;base64,..."> — and it looked right when you pasted it into Gmail's signature box. Then you sent a test email and the logo was gone: blank space, a broken-image icon, or nothing at all. This is expected Gmail behavior, not a glitch. Gmail does not render Base64 data URI images in signatures (or in received mail generally), and its signature editor was never built to accept raw HTML. Here is what is happening and the two fixes that work.
Why Base64 fails in Gmail signatures
Three separate mechanisms work against a Base64 signature logo in Gmail:
- Gmail strips data URIs from email. Any
data:image/...;base64source is removed during Gmail's HTML sanitization — both for mail you send and mail you receive. The signature HTML can even survive locally while every recipient sees a blank. - The signature editor does not accept raw HTML. Pasting markup into the signature box stores it as text-like content; Gmail re-serializes what it understands and drops the rest. The compose-window preview renders it, the sent message does not — which is exactly why the failure feels random.
- The 10,000-character signature cap. Gmail signatures are capped at roughly 10,000 characters including all HTML. Base64 strings blow through that budget instantly (next section).
None of these can be turned off with a setting. The fix is to stop shipping Base64 in the signature — not to shrink it and hope.
The 10,000-character trap
Gmail caps signatures at about 10,000 characters — tags, inline styles, URLs and Base64 strings all count. The math is unforgiving:
- Base64 encoding adds ~33% to a file's size as text: a 6 KB logo becomes an ~8,200-character string.
- Signature generators routinely emit 15,000-25,000 characters once a Base64 logo, social icons and inline styles are included.
- When the cap is exceeded, Gmail silently truncates or drops the signature — the save succeeds, the sent mail is missing whatever did not fit (often the logo, or everything after it).
How to check: open Settings → See all settings → General → Signature, click into the signature box, select all, and paste into any character counter. Over 10,000 = that is your problem. The fix: replace the Base64 string with a hosted image URL — one <img> line is ~80 characters instead of 8,000+ — and keep lean signatures under ~5,000 characters.
Fix 1: Upload the logo in Gmail's signature editor (recommended)
- Open Settings → See all settings → General → Signature (or the quick settings panel).
- Create or edit your signature, click the image icon in the editor toolbar, and choose Upload from computer.
- Size it with the Small / Medium / Large options, save changes at the bottom, and send a test to another inbox to confirm it renders.
Why this works: Gmail re-hosts the uploaded file on Google's own servers and rewrites the signature to reference that copy. That is why Gmail-to-Gmail signature logos display reliably even though Gmail strips your hand-made data URIs — the hosted copy is a normal image URL by the time the mail is sent.
Gotcha: if you upload "from URL" instead of your computer, Gmail depends on the original source staying reachable. If that source later 404s, the signature breaks for new sends (old sent copies may still show it, masking the regression). Always upload the file itself.
Fix 2: Use a hosted HTTPS image URL
For teams that manage signature HTML through Workspace tooling or a mail-merge system, hosting the logo yourself is the standard:
- Public, stable, HTTPS. The URL must load without login, headers or hotlink protection. Test in an incognito window — if it loads there, Gmail can load it.
- Private Google Drive links do not work. They require authentication; the same file shared "anyone with the link" can work but is fragile — a stable CDN or your own domain is better.
- Expect default image blocking. Some recipients' clients do not auto-load remote images (that is how open-tracking pixels get blocked). Keep text alongside the image so the signature is not literally empty when images are blocked.
- Optimize the file first. A signature logo should be roughly 150-320 px wide and under ~10 KB as a file. Encode-and-shrink it in one step with Compress PNG to Base64 (the compression works even if you then host the original file), and verify dimensions with the Base64 size calculator.
Diagnosis checklist
- Shows in the editor, gone in sent mail? Classic data-URI stripping (or raw-HTML serialization). Apply Fix 1.
- Signature completely missing, not just the image? Plain-text mode strips all HTML — check the three-dot menu in the compose window. Also check that you are editing the signature for the right send-as alias: each alias has its own signature slot, and "Signature defaults" must be set per address.
- Over 10,000 characters? Truncation. Replace Base64 with a hosted URL (Fix 2) and re-count.
- Hosted URL broken for recipients only? The URL requires auth, expired, or is hotlink-protected. Test in an incognito window, then re-upload from the computer (Fix 1).
- Works for you, not for a coworker on Outlook? Different client, different rules — see Base64 images not showing in Outlook.
Client compatibility at a glance
| Client | Renders Base64 images? | Reliable alternative |
|---|---|---|
| Gmail (web & apps) | No | Signature editor upload (Gmail hosts it) |
| Outlook (all builds) | No | CID attachment via editor / mail library |
| Yahoo Mail | No | Hosted HTTPS image |
| Apple Mail (macOS) | Yes | Data URI genuinely works |
| iOS Mail | Yes | Data URI generally works |
| Thunderbird | Yes | Data URI works |
Full client-by-client table and the encoder for the clients that do support data URIs: Base64 image in email signature — generator & guide.
Frequently asked questions
Why is my Base64 image not working in my Gmail signature?
Gmail strips data URI images during sanitization and the signature editor does not accept raw HTML. The logo shows in the editor preview but disappears in sent mail. Upload the image via the signature editor instead.
Can Gmail signatures contain Base64 images?
Not reliably. Gmail re-serializes signature HTML and drops data URIs. Use the editor's image upload or a hosted HTTPS URL.
Why does the signature image show in compose but not in the sent email?
The compose preview renders HTML that the sanitizer will remove on send. Also make sure plain-text mode is off, and that the signature is assigned to the right send-as alias.
What is the Gmail signature character limit?
About 10,000 characters, counting all HTML — and a single Base64 logo can be 8,000+ characters. Exceeding it causes silent truncation. Swap Base64 for a hosted URL and stay under ~5,000 characters.
What is the most reliable way to add an image to a Gmail signature?
Settings → Signature → image icon → upload from your computer. Gmail re-hosts the file, which is why Gmail-to-Gmail signature logos work even though Gmail strips data URIs.
Can I use a hosted image URL instead?
Yes — public, stable, HTTPS, and tested in an incognito window. Private Drive links and hotlink-protected servers are the usual failure modes.
Still want a Base64 data URI for the clients that support it (Apple Mail, Thunderbird) or for previewing the logo before upload? The email signature encoder produces a ready-to-paste snippet locally — nothing is uploaded.