Image in Media Browser on Picture Card

I have a jpg-file in the Media Browser. In an notification for iOS I can attach the image like this:

data:
  attachment:
    content-type: jpeg
    url: /media/local/snapshots/camera.jpg

I have tried some various ways to display camera.jpg in a Picture card. But I maybe don’t get the right syntax. Please advice!

This gives a 401 response, forbidden:
media/local/snapshots/camera.jpg

How to “add” the auth-token?

Anybody got the same issue?

In your case you need to add the image, not the URL. Try something like this:

  - service: notify.<yourdevice>
    data:
      title: TEST
      message: Here is a test image
      data:
        push:
          sound:
            name: default
            critical: 1
            volume: 1
        image: /media/local/Cameras/cam1/latest_snap.jpg

I save the image to disk first (use the folder /media/Cameras/cam1/latest_snap.jpg WITHOUT local here!

With regards to the URL part, I have the same thing. I want to show some pictures in lovelace and link it to the app, no go. So when I click the Companion app pop-up it links me to that specific image in the app. Only way this works is putting it in the www folder structure, but I like to avoid that since that is publicly accessible in theory.

You can look-up the auth token in the media browser (find the pic, right click it and open in new browser window) but I presume the auth token will expire sooner or later and that will lock you out of home assistant since it will ban your IP after x unsuccessful auth attempts.

it looks like lovelace / picture card / mobile app and the media service don’t play nice together yet.

1 Like

I agree, showing media from the media-browser on a picture card doesn’t work.

@Tinkerer, you often know a lot!
Are we using it incorrectly, och should I post a feature request or a bug-report? It feels like it is somewhere in between here… :slight_smile: Thanks for advice!

1 Like

I’ll direct you point 16 in the sticky, about tagging people like that and how it comes across.

The distinction is simple:

  • Bug report - something is in the documentation as working, but doesn’t
  • Feature request - you want something new
1 Like

Good idea! Since i can’t find anything in the documentation that it should work i think it be a feature request. If you have filed it, please post a link here so we know it’s connected and can follow the progress.

thnx! Matthijs

Thanks!
Sorry @Tinkerer, I was just seeking some wise advices! :slight_smile:

To me it was not obvious if its a change or a bug. But as @matthijsberg pointed out: Its not in the docs… I’ll go for the feature request track here.

Feature request here:

1 Like

Any update on this issue?

Nothing as far as I am aware of.

I honestly think this shouldn’t be a feature request.

What is described in the docs is not working at all so it’s clearly a bug.

UPDATE: I just created an issue in github here: Media Source integration is not working · Issue #100178 · home-assistant/core · GitHub