[GH-ISSUE #596] Preview picture #453

Closed
opened 2026-05-07 00:24:18 +02:00 by BreizhHardware · 2 comments

Originally created by @fred-gb on GitHub (Jan 30, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/596

Hi,
Just need an explanation.

When I use attach header from URL for a picture.

-H "Attach: https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Flower_July_2011-2_1_cropped.jpg/1200px-Flower_July_2011-2_1_cropped.jpg"

I receive a link to this picture.
Capture d’écran 2023-01-30 à 18 46 20

And when I attach a local picture receive picture preview
Capture d’écran 2023-01-30 à 18 47 21

Why don't have the same behavior? Why I can't see preview from URL?

Thanks

Originally created by @fred-gb on GitHub (Jan 30, 2023). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/596 Hi, Just need an explanation. When I use attach header from URL for a picture. ``` -H "Attach: https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Flower_July_2011-2_1_cropped.jpg/1200px-Flower_July_2011-2_1_cropped.jpg" ``` I receive a link to this picture. <img width="898" alt="Capture d’écran 2023-01-30 à 18 46 20" src="https://user-images.githubusercontent.com/17061623/215554202-6e14481c-ad26-4df1-9101-de1e1767cb11.png"> And when I attach a local picture receive picture preview <img width="898" alt="Capture d’écran 2023-01-30 à 18 47 21" src="https://user-images.githubusercontent.com/17061623/215554471-43cbac27-35a6-4294-86fc-e7f008798025.png"> Why don't have the same behavior? Why I can't see preview from URL? Thanks
BreizhHardware 2026-05-07 00:24:18 +02:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@binwiederhier commented on GitHub (Jan 30, 2023):

Embedding a preview from a foreign URL is not possible due to the browsers' cross-origin policies. Unless the other host allows us to embed the image, the image will not display. The only way around this is to upload the file to the ntfy webserver.

The Android app does not have this restriction. This is purely a browser restriction.

<!-- gh-comment-id:1409065648 --> @binwiederhier commented on GitHub (Jan 30, 2023): Embedding a preview from a foreign URL is not possible due to the browsers' cross-origin policies. Unless the other host allows us to embed the image, the image will not display. The only way around this is to upload the file to the ntfy webserver. The Android app does not have this restriction. This is purely a browser restriction.
Author
Owner

@fred-gb commented on GitHub (Jan 30, 2023):

Thanks!

<!-- gh-comment-id:1409088313 --> @fred-gb commented on GitHub (Jan 30, 2023): Thanks!
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#453
No description provided.