onesignal: Chrome Big Picture not work
Hi,
I need to set an large image as attachment for my notifications, but it doesn’t work. This is my sample code:
public function toOneSignal($notifiable)
{
return OneSignalMessage::create()
->setIcon($this->site_logo)
->setImageAttachments($this->post->featured_image)
->setSubject($this->post->title)
->setBody($this->post->getExcerpt(120))
->setUrl($this->post->canonical_link)
->setButton(
OneSignalButton::create('id') ->text('Download')
);
}
Please help me solve this. Any help would be appreciated! Thanks
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (2 by maintainers)
Then i am sorry, but i guess only the Onesignal support can help you.
Have you tried the tips from https://documentation.onesignal.com/docs/notification-images-not-showing? I can not find an error in the implementation. Did you notice that the file need to be a local image? See https://documentation.onesignal.com/reference#section-attachments for more details
Do you test it on MacOS? As of Chrome 59 this isn‘t available anymore: https://onesignal.com/blog/web-push-changes-in-chrome-59/
What’s the content of the image property?
You should point to the absolute url if I recall correctly, like