open graph image urls are relative and may not work for non-relaxed implementations #3872

Closed
opened 2026-02-05 09:22:09 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @eleith on GitHub (Jul 14, 2024).

The bug

sometimes, the open graph image from a shared link is not found, resulting in no image preview (ex: signal app on android)

The OS that Immich Server is running on

n/a

Version of Immich Server

latest

Version of Immich Mobile App

latest

Platform with the issue

  • Web

Your docker-compose.yml content

n/a

Your .env content

n/a

Reproduction steps

1. generate a share link from immich
2. share the link on a social network that implements a strict form of the open graph protocol
3. note that the image preview is not found / is broken

Relevant log output

n/a

Additional information

when sharing a link from immich on social networks / messaging apps / etc, a preview is grabbed from the og:image value in the headers of the sharing page.

the value is currently a relative path to a thumbnail of the first asset being shared. many implementations will correctly concat this path to the base URL of the share link.

however, not all implementations will do this correctly (ex: signal on android), so many opengraph checkers will not show any broken behavior.

the opengraph protocol itself doesn't make this immediately clear, but later in the document (and the turtle spec), they do declare that url values are defined as:

All valid URLs that utilize the https:// or https:// protocols

all examples in the document also make use of fqdn form of the URLs, so in general, it seems safe and more transparent to include this form of the URL.

Originally created by @eleith on GitHub (Jul 14, 2024). ### The bug sometimes, the open graph image from a shared link is not found, resulting in no image preview (ex: signal app on android) ### The OS that Immich Server is running on n/a ### Version of Immich Server latest ### Version of Immich Mobile App latest ### Platform with the issue - [X] Web ### Your docker-compose.yml content ```YAML n/a ``` ### Your .env content ```Shell n/a ``` ### Reproduction steps ```bash 1. generate a share link from immich 2. share the link on a social network that implements a strict form of the open graph protocol 3. note that the image preview is not found / is broken ``` ### Relevant log output ```shell n/a ``` ### Additional information when sharing a link from immich on social networks / messaging apps / etc, a preview is grabbed from the `og:image` value in the headers of the sharing page. the value is currently a relative path to a thumbnail of the first asset being shared. many implementations will correctly concat this path to the base URL of the share link. however, not all implementations will do this correctly (ex: signal on android), so many opengraph checkers will not show any broken behavior. the [opengraph protocol itself](https://ogp.me/) doesn't make this immediately clear, but later in the document (and the turtle spec), they do declare that url values are defined as: _All valid URLs that utilize the https:// or https:// protocols_ all examples in the document also make use of fqdn form of the URLs, so in general, it seems safe and more transparent to include this form of the URL.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#3872