Article OG card: JPEG + warm on preview (fix missing WhatsApp image)#640
Merged
Conversation
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>
|
ArchLens - No architecturally relevant changes to the existing views |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Audio cards unaffected. Re-test with a fresh article URL (WhatsApp cached the old text-only preview per-URL).
🤖 Generated with Claude Code