Repository navigation
Link share images by their content so a redrawn card is fetched again - #88
Merged
Merged
Conversation
LinkedIn kept showing the old home card next to the new title: it caches an image under its URL, and the redrawn card was published under the same /og-image.png. Share images are now linked as ?v=<content hash>, so a changed card is a new address and an unchanged one keeps its cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014dGcvXuyBrVM98ntKmvVB8
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.
Requested by Yanir · project thread
What changed
Every share image is now linked with a version from its content:
og-image.png?v=<hash>/og-image-en.png?v=<hash>inindex.html(og:image, twitter:image), the prerendered pages and the JSON-LD.share/<route>.jpg?v=<hash>, where the hash covers what the card says, its picture andscripts/share-cards.mjs(the card is drawn after the build, so its bytes do not exist yet).frontend/seo/versioned.mtsholds both helpers.Why
A link to yanirrot.com shared in LinkedIn showed the new title next to the old dark home card. LinkedIn (like Facebook and WhatsApp) caches an image under its URL, and the redrawn card was published under the same
/og-image.png, so the re-read page pointed at a URL LinkedIn already had. A changed image now gets a new address; an unchanged one keeps its address and cache.How to verify
cd frontend && npm run build, thengrep og:image dist/index.html dist/en.html dist/blog/agents-ask-approval.htmlshows?v=URLs.Checklist
git commit -s), see CONTRIBUTING.md (not signed off)npm run typecheck,npm run lint,npm run format:checkandnpm run buildpass fromfrontend/bash .github/scripts/check_hygiene.shpasses from the repository rootGenerated by Claude Code