fix(seo): declare the real og:image dimensions - #654
Open
pucedoteth wants to merge 2 commits into
Open
Conversation
Head.tsx advertises the social preview image as 1080x1080, but public/logo/build-the-future.png is 1920x1080. The PNG header reports 1920x1080, so every page has shipped a square aspect ratio for a 16:9 image. og:image:width and og:image:height exist so a scraper can lay the card out before it has fetched the image. Facebook, LinkedIn and Slack reserve space from these values, so a 1.78:1 image announced as 1:1 is scaled or cropped into the wrong box. Set the width to the value the file actually has, and note next to the tags that they track the asset. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The bug
src/components/Head.tsxadvertises the social preview image as square:The image it points at is not square. Reading the PNG header of
public/logo/build-the-future.png:Every page on the site therefore ships a 1:1 aspect ratio for a 16:9 image.
Why it matters
og:image:widthandog:image:heightare not decoration — they exist so a scraper can lay the card out before it has fetched the image bytes. Facebook, LinkedIn and Slack reserve space from these values on first crawl, so an image announced as square is fitted into a square box and then scaled or cropped when the real 16:9 file arrives.The image itself is fine: 1920x1080 is 1.78:1, comfortably inside what
twitter:card=summary_large_imagewants. Only the declaration is wrong.The fix
Set the width to what the file actually is, and leave a note next to the tags that they track the asset — that coupling is what drifted in the first place.
Note on #440
#440 also touches
Head.tsx, generating OG images withvercel/oginstead of serving the static PNG. That is a different change — a feature, +272 lines and a new dependency — and it has been dormant since November 2025 withmergeable: UNKNOWN. This fix corrects the metadata for the image that is being served today, and would simply be superseded if #440 ever lands. Happy to close this if you would rather take that route.Test plan
Verified in the build output rather than just the source — the generated HTML now carries the corrected value:
Dimensions read straight from the file header, so the number is not a guess:
🤖 Generated with Claude Code