# Include camera JPEG into E-mail

**URL:** <https://discourse.nodered.org/t/include-camera-jpeg-into-e-mail/96158>\
**Category:** General\
**Created:** [21 March 2025 17:17 UTC](https://discourse.nodered.org/t/include-camera-jpeg-into-e-mail/96158 "2025-03-21T17:17:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sammie76-2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sammie76-2/32/99634_2.png) [@sammie76-2](https://discourse.nodered.org/u/sammie76-2)\
**Post date:** [21 March 2025 17:17 UTC](https://discourse.nodered.org/t/include-camera-jpeg-into-e-mail/96158/1 "2025-03-21T17:17:20Z")

</div>

Hi!

I want to get a picture (jpeg) from a security camera and put it into an email with node red. I realized that with pushover in node red. Sending email also works fine. But I have no idea how to include an jpeg into the email i send with node red (no attachment, it should be included into the mail).

Thanks a lot for your help!

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [21 March 2025 19:14 UTC](https://discourse.nodered.org/t/include-camera-jpeg-into-e-mail/96158/2 "2025-03-21T19:14:32Z")

</div>

Welcome to the forums @sammie76-2

I dont use the email Node.  
But assuming this is a HTML Body?

You could use an inline blob?

```auto
<img src="data:image/jpeg;base64,<Base64>"/>

```

1. convert the image to base 64
2. In a `Template` Node, use something like below

```auto
<img src="data:image/jpeg;base64,{{{msg.imageB64}}}"/>

```

See: [How to display Base64 images in HTML - Stack Overflow](https://stackoverflow.com/questions/8499633/how-to-display-base64-images-in-html)

Most emails clients also support including the image in body (that is attached) - but I think its more work.

Others may have tricks here (or correct ways 😄), but its what first popped into my head.  
you can convert the buffer of an image to base64 in Node RED very easily.

I include images this way often in other systems

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [22 March 2025 05:25 UTC](https://discourse.nodered.org/t/include-camera-jpeg-into-e-mail/96158/3 "2025-03-22T05:25:16Z")

</div>

If you use the email node:

> If the payload is a binary buffer then it will be converted to an attachment. The filename should be set using `msg.filename` . Optionally `msg.description` can be added for the body text.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [20 June 2025 05:25 UTC](https://discourse.nodered.org/t/include-camera-jpeg-into-e-mail/96158/4 "2025-06-20T05:25:38Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
