Adding local pictures to dashboard picture card - what path to use?

I am running HA OS 8.1 updated on 2022.5.5 running on an i5 NUC.
I am new to HA and all was going well with many integrations and general configurations working.
I am currently constructing a number of dashboards in which I wish to include picture cards containing my own pictures. I have set up Samba and used my other PC to populate the automatically-created by HA ‘media’ folder with some test pictures (small jpegs). The problem is I cannot work out how, assuming it is possible, to set the image path in the dashboard ‘picture card’ code to an image in this /media folder. I can see these pictures by clicking on the media sources folder within HA under Local Media though. I can also load pictures using a web URL but can’t set the path to the local images correctly. Have I missed something?

Hi,

To serve static content from your HA instance like pictures for picture entity cards please check the doc here : HTTP - Home Assistant

Short : create a www folder in the config folder. Place here your images, use as URL : /local/your_file.ext
You can also use sub-folder(s) in www with URL : /local/sub_folder/you_file.ext

Edit : BTW, welcome to HA
Keep your setup up to date, check your recorder config before your database size increase too much. HF !

8 Likes

I use the www folder
image: /local/folder xxx/picture.png

1 Like

Thank you to all posters pointing me to using /local/myfilename as long as myfile has been added to the www folder. I will do that if that is the only solution. I just wondered what the auto-created media folder (that I can populate using Samba) is for if not for a convenient store of my local images and videos. I can see them in /media folder and view them, I just can’t seem to find the path to them when completing the Image Path (required) field of the Picture Card Configuration. Have I missed the point somehow?

P.S. I have now used the suggested path and it works fine thank you but I’m still not sure why the /media folder in HA seems unusable in this use case.

1 Like

I’m struggling with the same issue. I tried to save my camera snapshots to /media folder, but then they were unavailable for picture card. But at least it was possible to attach the image to a companion app notification. But then I noticed that the image no longer required authentication!!! Nowhere in the documentation does it say that images in /media folder will be publicly available after they have been used in a notification!!!

Try this:

Then edit dashboard, add card by entity, search up the camera entity you created above, and add the suggested picture entity card to the dashboard.

1 Like

I’m so sick of having this issue. Why can’t HA make this easy?

1 Like