How to open /media image via relative URL in clickAction?

Hi. Can anyone share how to reference an image using the media_source integration, via the clickAction parameter in a notification?

Attaching images from /media to a notification works just fine. But with, for example:

        "image": "/media/local/amazon_order_2021-08-03_XXXX.jpg",
        "clickAction": "/media/local/amazon_order_2021-08-03_XXXX.jpg"

While the attached image shows up, tapping the notification leads to a 401: Unauth response (in the Companion app)

Any errors in the HA logs? did you by chance revoke any access tokens? Are you certain the path you are selecting is correct and valid? You can use a browser to ensure the proper location. Are you able to navigate to the path?

No errors, no change to tokens, and I believe the path is accurate because browsing to /media/local/amazon_order_2021-08-03_XXXX.jpg returns 401: Unauthorized, while browsing to /media/local/notarealfile.jpg returns 404: Not Found.

I’m having the issue with the Android companion app. Did you figure out anyway around this?

Negative. I suspect that this sort of use case is not currently supported.

if you guys want this to be supported, I recommend creating a feature request on github

This thread was preceded by #1672

1 Like

re-opened the request

Two years later, and I’m seeing the same issue still.

Has anyone found a suitable workaround? Otherwise, I will add a subfolder to www and store a copy of the image there for this purpose alone.

I am having the same issue too.

Same issue here :frowning:

I found this issue after opening a similar/duplicate issue while attempting to use media_source URI.

Neither the URI or /media shortcut work for clickAction.

Same here…