How to share a JPG file created in Node-Red with Lovelace

I am running HASSIO Supervised on a Raspberry Pi 4.
I am receiving a JPG image file in Node-RED and I save the contents in /share.

I have also the following whitelist:

    - /share

How can I display the JPG file in Lovelace.
I tried the Picture Card with the Image Path /share/filename.jpg but the image is not recognized.
Picture Entity and Picture Glance also do not recognize the JPG image.

Does anybody know how to share a file between Node-RED and Lovelace (Home Assistant)?


Save pictures under: / config / www /
Call: / local /
I hope I understand you correctly.

However, the image will not update immediately or until the browser cache is cleared.
Maybe you are looking for something like generic camera?

Again, I found what I actually meant:
local file
Save picture as: / config / www / …
use / local / … in configuration.yaml.
Will be updated immediately even if the image is changed.

1 Like

Thanks @pwgdrx but I think I need something else
/config/www is used to share files over a http:// link

I don’t know what you mean with /local in configuration.yaml


Sorry, I messed up. Almost everywhere you have to specify / local / if the real directory is / config / www /. Here it is, for me the first case, probably not so… :frowning:

For me it works like this:

in configuration.yaml

  - platform: local_file
    file_path: /config/www/local_file_camera/image.png

Then a picture glance card:

After adding an image or renaming an existing image in the directory, it appears in the card after a few seconds.


1 Like

Thanks @pwgdrx for your pointer to

I am going to try it out. Will let you know the result.

@pwgdrx it works!

  1. I whitelist the folder /share in configuration.yaml
  2. in Node-Red I save a JPG file in the folder /share
  3. I created a camera like you said:
   - platform: local_file
     name: example_camera
     file_path: /share/example.jpg

Then you can refer to the camera in a card

1 Like