# How to embed images inline via cid in Resend emails

Resend had no documented way to embed an image inline in the email HTML via Content-ID (cid), which is useful for small markup and for not fetching images from external servers at open time. Users referenced the react-email discussion on cid support but resend's own API did not expose it. The feature request asked for an inline-content-id style attachment property.

## How to handle it

CID embedding is supported in resend@4.8.0 and later via the `inlineContentId` attachment property. Reference the attachment in your HTML with `src="cid:[id]"`:

```js
resend.emails.send({
  from: 'Acme &lt;[EMAIL]&gt;',
  to: ['[EMAIL]'],
  subject: 'Hello',
  html: '&lt;img src="cid:myimage"/&gt;',
  attachments: [{ content: attachment, filename: 'myimage.png', inlineContentId: 'myimage' }],
});
```
The maintainer confirmed this was added in PR #554 and released in 4.8.0.
Source: https://github.com/resend/resend-node/issues/319