---
title: "Brevo Inline Images: cid Works with the Attachment File Name"
url: "https://www.dariuszparys.com/brevo-inline-images-cid"
author: "Dariusz Parys"
published: 2026-11-19T09:09:35.000Z
updated: 2026-11-19T09:09:35.000Z
description: "Brevo's docs say transactional email has no inline images. They render in Gmail, Outlook.com and HEY if the img src is cid plus the attachment file name."
tags:
  - "Email"
  - "Brevo"
  - ".NET"
applies_to:
  - "Brevo transactional sends through the v3 HTTP API with your own rendered HTML and base64 attachments"
does_not_apply_to:
  - "Brevo marketing campaigns and Brevo-hosted templates"
tested: "2026-11-18 and 2026-11-19, Brevo free trial account, test emails with one and with three image attachments, viewed in Gmail (web), Outlook.com (web) and HEY"
findings:
  - id: "F1"
    claim: "Brevo renders an attachment inline when the HTML references it as cid followed by the attachment's exact file name, extension included."
    evidence: "Test emails with one and with three attachments (JPEG and PNG), viewed in Gmail (web), Outlook.com (web) and HEY. Microsoft 365 and Outlook desktop not verified."
    cite: "https://www.dariuszparys.com/brevo-inline-images-cid#finding-F1"
  - id: "F2"
    claim: "A cid reference that does not match an attachment name renders blank or as a broken image."
    evidence: "Control reference without the file extension, blank in HEY and broken with alt text in Gmail."
    cite: "https://www.dariuszparys.com/brevo-inline-images-cid#finding-F2"
  - id: "F3"
    claim: "The stored body returned by GET /v3/smtp/emails/{uuid} shows matched images with the image data embedded. Unmatched references remain as cid references with a generated id."
    evidence: "Read back for the test emails of both days."
    cite: "https://www.dariuszparys.com/brevo-inline-images-cid#finding-F3"
  - id: "F4"
    claim: "Brevo replaces the attachment file name everywhere in the HTML, including visible text and alt attributes, not only in src."
    evidence: "Observed in the stored body of the first test email. Not rechecked in the second test."
    cite: "https://www.dariuszparys.com/brevo-inline-images-cid#finding-F4"
---

# Brevo Inline Images: cid Works with the Attachment File Name

Brevo (formerly Sendinblue) says that inline images are not supported in transactional email. In my tests they work in Gmail, Outlook.com and HEY: attach the image and reference it in the HTML as `cid:` followed by the attachment's file name.

```html
<img src="cid:company-logo.png" />
```

Brevo does not document this. The rest of this post shows the tests, the change it needs in your code and the limits I know of.

## Why inline images instead of hosted URLs

I ran into this while moving a .NET application's transactional email from Azure Communication Services (ACS) Email, which Microsoft is retiring, to Brevo. The email layout has three branding images: a banner, a product wordmark and a company logo. With ACS we sent them as inline (embedded) attachments and referenced them by Content-ID:

```csharp
message.Attachments.Add(
    new EmailAttachment(image.FileName, image.ContentType, BinaryData.FromBytes(image.Content))
    {
        ContentId = image.ContentId // e.g. "company-logo"
    });
// markup: <img src="cid:company-logo">
```

We use `cid:` because the alternatives are worse for a first-contact email. Gmail does not render `data:` URIs. Outlook and similar clients block remote images until the reader allows them, so with hosted URLs the branding is missing in the first email a user ever receives from you.

## Brevo's docs say inline images are not supported

- The attachment object in [`POST /v3/smtp/email`](https://developers.brevo.com/reference/sendtransacemail) has three fields: `url`, `content` and `name`. There is no Content-ID field and no inline flag.
- A Brevo staff member [wrote in the community forum](https://community.brevo.com/t/does-transactional-email-support-embedded-image/6665) that embedding images with a CID header is not supported for transactional email, through the API or SMTP.
- [Anymail's Brevo page](https://anymail.readthedocs.io/esps/brevo/) states that "Brevo's v3 API doesn't support inline images, at all", confirmed with Brevo support in 2018.
- The [Brevo FAQ](https://developers.brevo.com/docs/other-common-questions) recommends hosted absolute image URLs.

## Testing `cid:` with the attachment file name

The first test was one email with one attachment, `company-logo.png`, referenced twice: as `cid:company-logo.png` and as `cid:company-logo`, the Content-ID we used with ACS. In HEY the first reference showed the logo and the second was blank.

The second test used the three images of the real layout, one JPEG and two PNGs. Each was attached under a prefixed name and referenced by exactly that name. A fourth reference without the file extension served as a control that should not render. Reduced to the relevant fields, the request was:

```json
{
  "sender": { "email": "sender@example.com" },
  "to": [{ "email": "recipient@example.com" }],
  "subject": "cid test",
  "htmlContent": "<img src=\"cid:acme-mail-hero-banner.jpg\"> <img src=\"cid:acme-mail-brand-wordmark.png\"> <img src=\"cid:acme-mail-company-logo.png\"> <img src=\"cid:acme-mail-company-logo\" alt=\"control\">",
  "attachment": [
    { "name": "acme-mail-hero-banner.jpg", "content": "<base64>" },
    { "name": "acme-mail-brand-wordmark.png", "content": "<base64>" },
    { "name": "acme-mail-company-logo.png", "content": "<base64>" }
  ]
}
```

I sent it to four mailboxes:

| Mailbox           | Matching references                          | Control                    | Where it landed          |
| ----------------- | -------------------------------------------- | -------------------------- | ------------------------ |
| Gmail (web)       | Rendered inline                              | Broken image with alt text | Inbox                    |
| HEY               | Rendered inline                              | Blank                      | Inbox                    |
| Outlook.com (web) | Rendered inline after moving it to the inbox | Not checked                | Junk, images blocked     |
| Microsoft 365     | Not seen                                     | Not seen                   | Not in the inbox or Junk |

The banner and the logo were visible in all three clients. The wordmark is white on a transparent background, so on the white test page I could not see it; I count it as not confirmed.

Two conclusions follow. Brevo links every `cid:` reference that equals an attachment's `name` to that attachment, and it does so for several attachments in one message. The match has to be exact, extension included: the control differed only by the missing `.png` and did not render.

The Outlook.com and Microsoft 365 rows are about the sender, not about the images. I sent from a free-mail address whose domain publishes a DMARC policy of `p=quarantine` and does not authorize Brevo. Outlook.com put the message in Junk as an unverified sender and blocked its images until I moved it to the inbox. Microsoft 365 accepted the message, but it reached neither the inbox nor Junk, which points to quarantine. I have not confirmed that.

## Checking a send without opening it

Brevo stores the body of each transactional email. `GET /v3/smtp/emails?email=<recipient>` lists the sent messages with their `uuid`, and `GET /v3/smtp/emails/{uuid}` returns the stored body.

In that body, a matched image appears with the image data embedded. An unmatched reference stays a `cid:` reference, with a generated id of the form `cid:<date>.<n>@mail.0` instead of the value you sent. So any `cid:` left in the stored HTML is an image that will render blank, which makes this a check you can automate after a test send.

## The change in your code

The Content-ID becomes the file name, and the attachment is sent under that name:

```csharp
// before
new BrandingAsset(ContentId: "company-logo", FileName: "company-logo.png", MimeType: "image/png");
// after
new BrandingAsset(ContentId: "acme-mail-company-logo.png", FileName: "acme-mail-company-logo.png", MimeType: "image/png");
```

The `acme-mail-` prefix is there for a reason that the next section explains.

## Limits

:::callout{tone="red" emoji="❗"}
Not tested: Outlook desktop, Microsoft 365, mobile mail apps, and whether some clients list the images as regular attachments as well.
:::

**Use file names that cannot occur anywhere else in the HTML.** In the first test Brevo replaced the file name in my caption text and in `alt` attributes too, not only in `src`. A name like `logo.png` is likely to appear in an `alt` text or a link; `acme-mail-company-logo.png` is not.

**The behavior is undocumented**, so it can change without notice. Keep a mode in your code that switches to hosted image URLs.

## If you need documented support

SendGrid, Postmark, Mailgun and Resend document Content-ID support for inline images. We stayed with Brevo for EU hosting and price, and keep the hosted-URL mode in case the behavior changes.
