[GH-ISSUE #831] Support icons for desktop notifications in web app #587

Open
opened 2026-05-07 00:25:38 +02:00 by BreizhHardware · 1 comment

Originally created by @Hakkin on GitHub (Aug 3, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/831

💡 Idea

Currently, the web app just sets a constant URL as the icon with no way to change it.

github.com/binwiederhier/ntfy@8ba4b72b37/web/src/app/notificationUtils.js (L50)

Desktop notifications support supplying arbitrary URLs for the icon, so it makes sense to just pass along the supplied icon URL. This should work pretty much exactly like the image handling code in that function block.

github.com/binwiederhier/ntfy@8ba4b72b37/web/src/app/notificationUtils.js (L54)

It's currently possible to display images in the notification through the attach parameter, but this is done through the image notification option, which is only supported by Chrome-based browsers. The icon option is supported by all major browsers.

💻 Target components

Web app

Originally created by @Hakkin on GitHub (Aug 3, 2023). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/831 <!-- Before you submit, consider asking on Discord/Matrix instead. You'll usually get an answer sooner, and there are more people there to help! - Discord: https://discord.gg/cT7ECsZj9w - Matrix: https://matrix.to/#/#ntfy:matrix.org / https://matrix.to/#/#ntfy-space:matrix.org --> :bulb: **Idea** <!-- Share your thoughts; try to be detailed if you can --> Currently, the web app just sets a constant URL as the icon with no way to change it. https://github.com/binwiederhier/ntfy/blob/8ba4b72b377725801d8912c98a94dae704642d31/web/src/app/notificationUtils.js#L50 Desktop notifications support supplying arbitrary URLs for the icon, so it makes sense to just pass along the supplied icon URL. This should work pretty much exactly like the `image` handling code in that function block. https://github.com/binwiederhier/ntfy/blob/8ba4b72b377725801d8912c98a94dae704642d31/web/src/app/notificationUtils.js#L54 It's currently possible to display images in the notification through the `attach` parameter, but this is done through the `image` notification option, [which is only supported by Chrome-based browsers](https://caniuse.com/mdn-api_notification_image). [The `icon` option is supported by all major browsers.](https://caniuse.com/mdn-api_notification_icon) :computer: **Target components** <!-- Where should this feature/enhancement be added? --> <!-- e.g. ntfy server, Android app, iOS app, web app --> Web app
Author
Owner

@Hakkin commented on GitHub (Aug 3, 2023):

Alternatively: Add a fallback for displaying image attachments using icon for non-Chrome browsers.

<!-- gh-comment-id:1663541502 --> @Hakkin commented on GitHub (Aug 3, 2023): Alternatively: Add a fallback for displaying image attachments using `icon` for non-Chrome browsers.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#587
No description provided.