diff --git a/backend/app/downloads/og.py b/backend/app/downloads/og.py index a28ee99..f1bcdc9 100644 --- a/backend/app/downloads/og.py +++ b/backend/app/downloads/og.py @@ -73,6 +73,12 @@ def _watch_tags(token: str, db: Session) -> str | None: if image: # A real thumbnail → a large image card; without one, a plain (text) card is served. tags.append(_tag("og:image", image)) + # Facebook's scraper is pickier than Apple's on-device unfurl: spell out that the image is a + # public HTTPS JPEG so it renders the card even when it won't fetch/sniff the bytes itself. + if image.startswith("https://"): + tags.append(_tag("og:image:secure_url", image)) + if image.endswith("poster.jpg"): + tags.append(_tag("og:image:type", "image/jpeg")) tags.append(_tag("twitter:card", "summary_large_image", attr="name")) tags.append(_tag("twitter:image", image, attr="name")) else: