[ANNOUNCE] node-red-contrib-data-uri

Hi folks,

Yesterday I got a question about embedded images with my node-red-contrib-ui-web-push node. In this link you can see that it is possible to embed an image into a web push notification. For example when your camera capture an image of a burglar, you can send that image to your Android smartphone inside the notification:


However you need to include an image URI in the notification, which has some disadvantages:

  1. You probably don't want the image to be public accessible to everybody on the internet.
  2. The image should only be temporary available on the internet (until the client has read it). But you don't know how long ...

Luckily the web push notification documentation shows that the image url can be a data URI:


A data URI means that the resource (in this case the camera snapshot image) will be base64 encoded and included inside the URL. As a result the resource can be kept private, and can be removed after we have pushed it to our clients (e.g. Android smartphone).

To simplify this a bit, I developed the node-red-contrib-data-uri node :champagne: :clinking_glasses: :partying_face:

As always all "constructive" feedback is very welcome !!

P.S. It is not available on NPM yet, so if you want to test it you can install it directly from my Github repository (from within your .node-red folder):

npm install bartbutenaers/node-red-contrib-data-uri

Have fun with it!!


Not to be a "spelling nurd" (I am not... rather the opposite as I can barly speel as it is :stuck_out_tongue: thus I need clarification for my own understanding )

But are you referring to a special acronym when you type URI instead of URL, or is it in fact a typo?

EDIT - OK, forget that... Apparently a URI is a thing :blush: - Uniform Resource Identifier - Wikipedia

Yes, but most of the time I mix URI and URL. In this case I used URI based on this wikipedia article.

In this link the difference between them is explained.
But I'm not going to get a nightmare tonight, if I should have used URL instead of URI :wink:

That is good :smiley:

Unfortunately, I DO have issues understanding my own misspellings and math stuffs, let alone others, thus I asked.

And here I am with an extensive technical hobby in things where precision is paramount :crazy_face:... go fig.

Thanks, now I can mentally think URL when reading this topic... not that I understand it much better anyhow :blush: But I try.

1 Like

Don't know if it can help, but I had already added both "URL" and "URI" to the list of keywords. Hopefully that helps people to find their way to this node ...

1 Like

A very helpful node Bart. I can envisage uses for this in all sorts of places.

For example, I use a data URI in my professional email signatures (for the BCS logo for example, sometimes for some corporate messages). Those will be displayed by email clients where external image links will not be (due to security issues).


Hi Bart, sorry, honestly dont mean to rain on your parade but I just wanted to point out that if anyone has already installed node-red-contrib-image-tools and are using it for resizing / rotating an image etc before posting to Telegram or Notification etc, that it was already possible to generate a data URI of an image...

... the idea of including that feature in image-tools was exactly for this scenario where you would be working with images then would like to transmit it somewhere like Telegram or Email etc.

Obviously, this is limited to images unlike your node.

1 Like

Hi Steve,
Thanks for the tip!
Indeed the use case that I have described above, this might indeed be a good solution.
I have added an Alternatives section to my readme page, to mention this.

1 Like

Version 1.0.0 is available in the Node-RED palette:


1 Like