What is “Content-ID” and how does it reference inline images?
Still have a question, spotted an error, or have a better explanation or a source we should cite?
A Content-ID (or CID) is a unique identifier for a file that's embedded directly inside an email. It lets you reference an image or other file in your HTML without hosting it on a web server.
Here's how it works. When you embed an image in an email's MIME structure, you give that file a Content-ID header (something like Content-ID: <logo123@example.com>). Then in your HTML body, you reference it with <img src="cid:logo123@example.com">. The email client matches the cid: reference to the embedded file and displays it inline.
The practical effect: the image appears inside the email as if it's part of the message itself, not loaded from an external URL. No tracking pixel, no broken image if your web server goes down, no privacy concern from loading remote content.
When would you actually use this? Almost never in modern email marketing. Most ESPs (like Mailchimp, Brevo, Klaviyo) host images on their CDNs and use regular src="https://..." URLs instead. Content-ID embedding makes your email file size larger, which can cause delivery problems or clipping in Gmail. And you lose the ability to track image loads (which is how most open tracking works).
Content-ID is still common in transactional email from custom SMTP setups, especially for things like embedded company logos in automated receipts. It's also useful if you're sending email in environments where external image loading is blocked by default (some corporate inboxes). But for newsletters and marketing campaigns, hosting images externally is the standard approach.
One gotcha: if you're building emails by hand and want to use Content-ID, make sure the ID you assign in the MIME part exactly matches the cid: reference in your HTML (including the angle brackets in the header). Mismatches will break the image display. Most email builders handle this automatically, so you'd only run into this if you're constructing raw MIME messages yourself.
If you're debugging an email and see cid: references in the HTML source, that's what this is. Check the raw MIME structure to find the matching Content-ID headers. You can use our Source Analyzer to parse the MIME parts and see how everything's connected.
Contributors
Who worked on this answer
Every name links to their profile. Every company links to their site. Real people, real accountability.