Displaying image from url in payload

so im trying to just display a jpeg still image from my ip camera, i can embed the image with just

but i want to try use the http request node to request the image from the camera. if i use the http node to request it i get

was wondering if its now possible to pass that response url onto a template node to display as a image on my dashboard. hopefully ive made it clear, im still new and learning so any advice is much appreciated. thanks

Hi Brad,

  • In the screenshot your template node (i.e. your dashboard) is getting the image directly from your camera, without using your Node-RED flow.
  • Then you say that you want to use the http request node to get the image from the camera. That is indeed another way of working which I also use from time to time.
  • But when you want to pass the response url to the template node, you are getting the same result as in the first case: you're dashboard will receive the url and will get the image again directly from the camera. Not sure what you want to achieve with that, except from allowing your template node to be able to show different camera urls.

I have explained this here a bit more detailled. It contains some links with extra information about this kind of stuff.

Kind regards,
Bart

Morning Brad,
Since your motto is 'one screenshot says more than thousand words', I will 'try' to interpret your screenshot to understand what you are doing.

From my 3 suggestions you have chosen this one: get every N seconds a snapshot image from the IP camera via a httprequest node, and push that image to your template node?

I think that your payload contains an UTF 8 string, which corrupts your image. In the httprequest node you should have output type 'Buffer'.

Then you have to base64 encode the image and push it to your dashboard. You can find an example flow in my link above (or shortcut the 'snapshot URL' option on this link).

2 Likes

so sorry mate, i gave up on this route. i posted the way i did because i couldnt post more than 1 image because i had only just signed up. thanks for taking the time

1 Like