Problem showing local image on app for mobile notifications

I cannot get a locally stored image sent to my mobile notification. Is there anything I need to set permission wise somewhere?
I tried /config/www/lastsnap.jpg which works in lovelace. I can also set this one and I can pick it up using the media browser in lovelace: /media/snapshots/lastsnap.jpg
But it won’t work in app with or without speech marks. An external image like: https://raw.githubusercontent.com/home-assistant/assets/master/logo/logo.png works fine and in the past when I got that image from my camera directly it worked too. Any ideas welcome!

service: notify.mobile_app_vog_l09
data:
  title: Campainha
  message: Ring Ring
  data:
    image: /config/www/lastsnap.jpg
    importance: high
    channel: doorbell_max
    clickAction: app://com.mcu.reolink
    vibrationPattern: 100, 1000, 100, 1000, 100
    actions:
      - action: URI
        title: View Image
        uri: lovelace/front
      - action: UNLOCK_DOOR
        title: Unlock Door
        uri: app://com.mcu.reolink
      - action: URI
        title: Live Stream
        uri: app://com.mcu.reolink

Can’t delete this, so I just had the lightbulb moment after a few days struggling…
it’s /local/snapshot.jpg as we reference a local file. Sorted!

2 Likes

you had to do anything special on the HA config to make this to work? I tried everything and can make this to work with a local image, if i use a hosted image works fine
thanks

share the code you used probably has something that needs to be adjusted

this is what I have now, for now i’m using the developers tools before to put the code in some automation, like i’ve said if I use a hosted image on the internet it works fine, i’m having trouble with local images, i’ve already whitelisted the directory and i’m able to use the images with other integrations like pushbullet without any issue, but with the mobile app is not working and also don’t see any log.

thanks

service: notify.mobile_app_phone12
data:
  message: test
  data:
    image: images/front.jpg

image: images/front.jpg change this to image: /local/images/front.jpg

Then make sure the file is located in {config directory}/www/images/front.jpg

Anything in the www folder is actually considered local and the leading slash should be included

3 Likes

@peteonus I now have the same solution as @dshokouhi suggested.

using:
{config directory}/www/images/front.jpg

worked for me, thanks for your help

1 Like

sorry didn’t see the notification on this… yes that’s it and my code as to send notification to phone:

image: /local/lastsnap.jpg
importance: high
channel: doorbell_max
clickAction: app://com.mcu.reolink
vibrationPattern: 100, 1000, 100, 1000, 100
actions:
  - action: URI
    title: View Image
    uri: lovelace/front
  - action: UNLOCK_DOOR
    title: Unlock Door
    uri: app://com.mcu.reolink
  - action: URI
    title: Live Stream
    uri: app://com.mcu.reolink

and this to set the image from the camera - note that I didn’t use local here but config/www which equates to the same as local:

service: camera.snapshot
data:
  filename: /config/www/lastsnap.jpg
target:
  entity_id:
    - camera.front_cam_profile000_mainstream
1 Like

Hi, someone know why in the iphone can se the image, but on android 13 don´t?

I save the image here:

/media/facesnap/snap.jpg

and this is how i sended:

android:

service: notify.mobile_app_androidluis
data_template:
  title: Están Tocando el timbre...
  message: Esta persona esta tocando...
  data:
    color: red
    image: /media/local/facesnap/snap.jpg

iphone:

service: notify.mobile_app_iphone_hosi
data_template:
  title: Están Tocando el timbre...
  message: Esta persona esta tocando...
  data:
    color: red
    image: /media/local/facesnap/snap.jpg
1 Like

Did you ever figure out a solution to this? iPhone receives image from my media folder but Android doesn’t.

1 Like