Question - I'm trying to send a large image along with a Chrome notification and everything works on Windows. However, the image is not shown on macOS - only the text. What's the problem?
Answer - The notification image (large/hero image) is not guaranteed on macOS.
When Chrome 59 moved to the native macOS notification system, the image option stopped being rendered: the notification is still displayed, but the image parameter is ignored. On newer macOS releases (Big Sur and later) Chrome may render the hero image, but this depends on the Chrome and macOS versions, and on the user's notification settings.
Recommendations:
- Treat the large image as supplemental - never put essential information only in the image.
- Always set an icon as well, since the icon is rendered on all desktop platforms.
- You can detect support at runtime:
if ('image' in Notification.prototype) { /* image supported */ }
Background reading (Chrome for Developers): Moving to the native notification system on macOS.
Comments
0 comments
Please sign in to leave a comment.