Skip to content

Article OG card: JPEG + warm on preview (fix missing WhatsApp image)#640

Merged
mircealungu merged 1 commit into
masterfrom
article-card-jpeg-warm
May 27, 2026
Merged

Article OG card: JPEG + warm on preview (fix missing WhatsApp image)#640
mircealungu merged 1 commit into
masterfrom
article-card-jpeg-warm

Conversation

@mircealungu
Copy link
Copy Markdown
Member

Follow-up to #639. WhatsApp showed the article title/description but not the image: the card was a ~530KB PNG (wrong format for a photo) rendered cold on first hit (downloads the article's photo), so the crawler's og:image fetch raced its timeout → text-only preview.

  • JPEG instead of PNG: ~530KB → ~75KB. Route + og:image now .jpg / image/jpeg.
  • Warm the card during the /shared_article_preview HTML request, so og:image is a cache hit when the crawler fetches it next.

Audio cards unaffected. Re-test with a fresh article URL (WhatsApp cached the old text-only preview per-URL).

🤖 Generated with Claude Code

WhatsApp showed the article's title/description but no image: the card was a
~530KB PNG (PNG is the wrong format for a photo) rendered cold on first hit
(it downloads the article's photo), so the crawler's og:image fetch raced its
timeout and it kept the text-only preview. Two fixes:

- Serve the article card as JPEG (~75KB, ~7x smaller) — crawlers fetch it fast
  and don't skip it. Route + og:image are now .jpg / image/jpeg.
- Warm the card during the /shared_article_preview HTML request, so og:image is
  a cache hit the moment the crawler asks for it (the photo download no longer
  races the image-fetch timeout). The photo is fetched only on a cache miss.

Audio cards are unaffected (flat PNG, no remote fetch, instant).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mircealungu mircealungu merged commit ec65375 into master May 27, 2026
3 checks passed
@mircealungu mircealungu deleted the article-card-jpeg-warm branch May 27, 2026 10:42
@github-actions
Copy link
Copy Markdown

ArchLens - No architecturally relevant changes to the existing views

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant