Photos in IOS Notifications...explain to me like I am five

Hi all,

I am trying to get security camera snapshots sent to my iphone via the companion app. However, the image is not coming through. When I long press the notification it acts like it wants to try and play a video. Can someone explain to me what I am doing wrong?

The notification comes through correctly however it says it failed to load the attachment.

My code is below:

data:
  title: Security Alert!
  message: Driveway Camera Detected Motion!
  data: 
    attachment:
      url: '/media/local/camera_snapshots/test.png'
      content-type: png
      hide-thumbnail: false ```

You need to post your code between two sets of triple back ticks so we can see the spacing and everything. Or use this button on the settings menu:
image

You are missing a colon after ‘url’.

Apologies, I have updated my original post.

No sweat. Looks better.

So a url of /blah1/blah2/test.png is in subdirectory blah2 of directory blah1 in the root of the HA webserver.

The root of the HA webserver is in /config/www of the file system.

In my example the picture would be at /config/www/blah1/blah2/test.png of the HA file system.

Where is your test.png in the file system?

And from your original post, the url of https://mynabuinstance.ui.nabu.casa/config/www/test.jpg would be wrong. For this if your test.jpg is in /config/www in the HA file system, the url would be https://mynabuinstance.ui.nabu.casa/test.jpg

Thanks! I was able to get it working now. I’m still not sure what I was doing wrong to start with, I had to have a syntax error or something. Either way it seems to work fine now, I even created several dummy sub-folders under www just to make sure. For anyone else that stumbles across this my code is below:

data:
  title: Security Alert!
  message: Driveway Camera Detected Motion!
  data:
    image: "https://MyNabuCasaURL.ui.nabu.casa/local/snapshots/driveway_camera_snapshot.jpg"