# Pushover Node with base64 image

**URL:** https://discourse.nodered.org/t/pushover-node-with-base64-image/97118
**Category:** General
**Created:** [18 May 2025 08:45 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118 "2025-05-18T08:45:04Z")
**Posts on this page:** 18
**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: [18 May 2025 08:45 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/1 "2025-05-18T08:45:04Z")

</div>

Hi everyone,

I'm trying to send an image via the Pushover node in Node-RED as an embedded image attachment.

Here's what I’ve done so far:

- I used the HTTP request node to fetch an image over HTTPS.
- I converted the image to base64.
- In a Function node, I added the base64 image to msg.attachment using this code:

```auto
msg.attachment = Buffer.from(msg.payload, 'base64');
return msg;

```

However, when I pass this to the Pushover node, the image doesn't show up in the message.

Has anyone successfully sent a base64-encoded image with the Pushover node? Do I need to include any additional metadata (like filename or content-type), or is just passing the Buffer enough?

Any advice or working example would be greatly appreciated!

Thanks in advance!

---

<div class="post-metadata">

### Author: ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)
#### Post date: [18 May 2025 08:56 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/2 "2025-05-18T08:56:23Z")

</div>

Not sure what to want to do, attach an image or embed an image.  
To see the image in the message I'm using `msg.image` to the Pushover node.

---

<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: [18 May 2025 09:08 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/3 "2025-05-18T09:08:47Z")

</div>

Thanks for your reply!

What I’m trying to do is embed the image directly into the Pushover message so that it shows up inline in the notification — not just as an attachment.

From what I found, setting `msg.image` is indeed the way to do that. However, in my case, it only works when the image is provided as a buffer, not as an HTTPS URL. When I try to set `msg.image` to an HTTPS link (e.g. from my camera), it doesn't display in the message — at least not for me.

But I’m not sure if this is the right approach — or if something else is required for the Pushover node to embed the image properly.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [18 May 2025 09:11 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/4 "2025-05-18T09:11:33Z")

</div>

You can't set it as a link - how could your end device (eg phone) browse to your camera to access that link ? (I hope it couldn't anyway). You need to get the image locally (eg using http request node - then send the buffer to pushover.

---

<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: [18 May 2025 09:17 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/5 "2025-05-18T09:17:29Z")

</div>

Yes, this is the way i am trying to do this right now.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/d/0db80d8e297efd7277786fed3da463d5229d8777.png)

Function2 has the code from my first post.

But with msg.attachment the picture is not shown in the pushover message. And that's why i am asking here ;-).

---

<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: [18 May 2025 09:23 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/6 "2025-05-18T09:23:16Z")

</div>

But don't you receive a buffer from the http request node ? Now you are converting it to base64 and then back to a buffer in the function node (?) - ie. what @dceejay is suggesting, just send the buffer directly from the http req node (set it to output a buffer) as `msg.image`

---

<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: [18 May 2025 09:39 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/7 "2025-05-18T09:39:02Z")

</div>

I used the change Node to set msg.image = msg.payload after the http request. But i get this error: "TypeError: msg.image.match is not a function".

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [18 May 2025 10:03 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/8 "2025-05-18T10:03:33Z")

</div>

have you confirmed (with a debug node) what the http-request is returning?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [18 May 2025 11:01 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/9 "2025-05-18T11:01:48Z")

</div>

how exactly do you have the change node set ? match is a comparison operation

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [18 May 2025 11:17 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/10 "2025-05-18T11:17:28Z")

</div>

You should probably be using Move msg.payload To msg.image

---

<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: [18 May 2025 14:59 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/11 "2025-05-18T14:59:57Z")

</div>

When I fetch the image using an HTTP Request node, I receive a buffer (1055996 bytes). I process this for email by converting it to base64 and embedding it into the email, which is then sent using an Email node — and the image displays correctly in the email.

Now, after the HTTP Request node, I’ve added a Move node that transfers the content of msg.payload into either msg.image or msg.attachment, depending on the test. However, in both cases the image is not delivered via Pushover anymore.

- If I use msg.image, I get the error: TypeError: msg.image.match is not a function, and the Pushover message is not sent.
- If I use msg.attachment, the Pushover message is sent, but without an image.

What can I do to make the image work with Pushover?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [18 May 2025 15:08 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/12 "2025-05-18T15:08:41Z")

</div>

> [@sammie76-2](#):
>
> TypeError: msg.image.match is not a function

Is that coming from the Change node?

---

<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: [18 May 2025 15:10 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/13 "2025-05-18T15:10:59Z")

</div>

No, from the pushover node.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [18 May 2025 15:14 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/14 "2025-05-18T15:14:35Z")

</div>

> [@sammie76-2](#):
>
> TypeError: msg.image.match

Which pushover node are you using? [Library - Node-RED](https://flows.nodered.org/search?term=pushover) shows several.

---

<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: [18 May 2025 15:17 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/15 "2025-05-18T15:17:57Z")

</div>

This one:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/d/adb16d677e6f34add0ecfcb40de1aa1f9cc05a58.png)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [18 May 2025 15:20 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/16 "2025-05-18T15:20:08Z")

</div>

From [node-red-contrib-pushover (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-pushover)

msg.image: The URL of the image in notification. Local file path or http(s) url

It says it can be a file path or a url, not a buffer.

---

<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: [18 May 2025 15:27 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/17 "2025-05-18T15:27:05Z")

</div>

Thanks! Now it works. I choosed node-red-node-pushover and this worked with msg.attachment.

---

<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: [16 August 2025 15:27 UTC](https://discourse.nodered.org/t/pushover-node-with-base64-image/97118/18 "2025-08-16T15:27:29Z")

</div>

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