Lovelace picturecard on Docker environment is not working

Hi All,
I am trying to setup my first floorplan, and for some reason it is not working.
The image is always coming empty like below


I am running HA version 0.87.1 on Docker env. Lovelace is in yaml mode and having below code.

title: Developement
# Include external resources
views:
  - title: Floor Plan
    cards:
      - id: picturecard
        type: picture
        image: /config/ha_image.png

I have ha_image.png at the root of HA config directory.

Any idea what I am missing…

Normally I put images under a folder in /www and then refer to it with:

image: /local/folder_name/ha_image.png

1 Like

Also I think you need to use picture-elements card.

I also tried picture-elements card, but no luck… :disappointed:
are you using docker ? I strongly feel it has to do something with docker and permissions associated to it… It looks like, HA is not able to find image…

I think sota is right. The image should be in a www directory in your config folder. If you need to create www you will have to restart home assistant. The www folder is referenced as /local you can create any structure under that you like.

Yes… That’s it !!! It works by adding “www” folder, which is getting referenced as “local”. Thanks all. Shouldn’t the documentation be updated accordingly…

The fact that it is running on Docker has nothing to do with it. :wink:

1 Like

Thanks, my bad…

We have all been there, look at it as a learning experience.

To make it clear for people just coming from Google:
Files need to be mounted into the container’s /config/www so they can be served on /local
Example:

//...
  volumes:
    - ./picture.jpg:/config/www/picture.jpg

This image can be addressed as /local/picture.jpg from HA and actually served as <ha-host>/local/picture.jpg by the web server

Hosting files doc

That statement is not entirely truthful. I have migrated my HA installation from a MacMini running HA core to a Docker Container installation on a QNAP NAS. My Audi Connect integration works on both, but the picture image referenced to in the picture element is ONLY visible on the HA running as vore on the Mac. On Docker it is simply just a grey background.

The path I use is /local/pictures/AudiA4Allroad.jpg, and the jpg-file is located in config/www/pictures/. Re-starting HA, changing language as described above makes no difference.

I need HELP!

EDIT: I hadn’t updated the card as it was statically referencing the IP of the Home Assistant VM, not the Docker VM

I have the exact same issue, I migrated my Home Assistant OS VM to a Docker container.

Everything is as it was, lights, plugs, media players, automations… except the picture elements.

I’ve removed/recreated the www folder and re-added the images… no change