Can't get the snapshot image visible in a card (dashboard)

Hi,
Can someone help with the following please. I’ve got a strange issue and can’t get the image into view.
image

With an automation I create a snapshot of my camera:

action:
  - service: camera.snapshot
    data:
      filename: /media/snapshot.jpg
    target:
      entity_id: camera.camera1

This works because I see the image on that location:
image

But this code doesn’t seem to work:

type: picture
image: /media/snapshot.jpg

How my configuration looks like:

homeassistant:
  media_dirs:
    media: "/media"
  allowlist_external_dirs:
    - "/media"

Am I missing something?

Try this:
image: /local/media/snapshot.jpg

doesn’t work either. In the logs it says this:
looks like it’s related to onvif?

Logger: homeassistant.components.onvif
Source: components/onvif/camera.py:155
Integration: ONVIF ([documentation](https://www.home-assistant.io/integrations/onvif), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+onvif%22))
First occurred: 20:30:33 (2 occurrences)
Last logged: 20:30:39

Fetch snapshot image failed from camera, falling back to FFmpeg; Unknown error: All connection attempts failed

First make sure the snapshot is being generated correctly, then only can you display it in a card. If it’s not, then the problem is with the entity that is supposed to generate the snapshot.

You can try to use the www folder for the snaphot.

/config/www/tmp/my_picture.jpg

My experience is that the media folder is not working for snapshots.

the strange thing is, I’ve tried your code and it saves the snapshot.jpg file there:
image
with this code:

action:
  - service: camera.snapshot
    data:
      filename: /config/www/tmp/snapshot.jpg

But when I try to display the image, it breaks:

code:

type: picture
image: /config/www/tmp/snapshot.jpg

Ok try these:

type: picture
image: http://yourhassip:8123/local/tmp/auffahrt_snapshot.jpg

You have to add the ip / or webadress of your home assistent.

it becomes even more strange. I’ve tried these two, only the second one works (so an image is displayed):

  1. http://myip:8123/local/tmp/snapshot.jpg
  2. /local/tmp/snapshot.jpg

but it’s an older picture, not the most recent one. I guess it has something to do with caching?!

Hmm which photo is in the folder? The new one? Then clear the cache of the browser and you will see if this is the problem.