Images in Push Notifications

Hello!

I’ve been trying to set up some push notifications when certain triggers occur. The push notifications are working great, except the attachments (images) to the notifications aren’t showing up.

I tried attaching a jpg and a png. I tried every combination, with the file format in the extension, by specifying content-type: jpg/jpeg/png. I’m pretty much stuck at the moment. Has anyone gotten an image to show up in the notification?

I did try to put that gif that’s given in the example. That worked great. Are only gifs working at the moment?

Edit: I just tried adding a third party gif, and that seems to be working well, too.

Can you show the payload you are sending?

Hi! I’ve tried it like this:

     - service: notify.iosapp
       data:
         message: "The heater has been left ON!"
         data:
           attachment:
             url: http://i.imgur.com/MJomuzn.png
             content-type: png
             hide-thumbnail: false

I’ve also tried jpg versions, uploading the image to different image hosting sites, trying random images from google images searches, even having the image file locally and giving it the path to the image. It only seems to work with gifs for me, even third party gifs from google searches.

Am I doing it wrong?

edit: as a side note, I also tried attaching a map with long/lat coordinates. When the notification comes through and force touch the notification to expand it, it seems to want to load the map but only displays the loading circle and never loads the map. Not sure if this is an iOS 10 bug or what.

Just tested this out myself, it’s because the URL is HTTP not HTTPS and App Transport Security (ATS) kicked in. Change to HTTPS and it will work. Will fix this in the next build.

Just fixed it for the next build. Will have to use HTTPS for the time being.

Yeah, it’s working now! Thanks :slight_smile:

Hey, has ATS been turned back on again? A few months ago I suddenly stopped seeing thumbnails in my messages, with no apparent change done by me.

Hmm, actually it probably isn’t that as I’ve tested it with an https link and it still doesn’t work:

data_template:
  data:
    attachment:
      url: 'https://nav.files.bbci.co.uk/orbit/1fd73d35e034e750cfa0abee967e1f41/img/blq-orbit-blocks_white_alpha.png'
  message: Test
service_template: notify.mobile_app_andy_s_iphone

I normally use the trigger object (hence the data_template) but for the purposes of this test I’ve stripped all of that out.

I’m just playing around with picture attachements as well. And accoding to https://companion.home-assistant.io/docs/notifications/notification-attachments/ I do not see any limitations.

But unfortunately I was not able to get a single thumbnail. Picture is delivered as expected. But no thumbnails at all.

Any advice? Problems? Issues?

Update: For whatever reasons, after two days, the thumbnails appear. Any clue on such behavior? Didn’t change anything.

For others, I am in the same situation, All I had was the loading spinning circle, and today it just started to work. Go figure…
I guess patience is a virtue