fix(landing): fix 404ing OG images for every model and integration page#5636
Conversation
Google Search Console flagged every /models/{provider}/{model}/opengraph-image
and /integrations/{slug}/opengraph-image URL as 404 (~230 pages total: 5
sample model pages plus ~130 more models, plus every integration).
Root cause: the sibling page.tsx for each of these routes sets
`dynamicParams = false`, a segment-level restriction that also blocks
the metadata route (opengraph-image.tsx) from rendering any param
combination it wasn't statically told about - but Next does not share
generateStaticParams between a page and its sibling metadata routes.
Since none of the three opengraph-image.tsx files exported their own
generateStaticParams, every param was "unknown" to that restriction and
404d, for every single model and integration.
Added a matching generateStaticParams to all three files, mirroring
each route's own page.tsx.
Note: the exact URLs in the audit report (bare /opengraph-image, no
suffix) aren't the real ones - Next serves these at a build-generated
hash suffix (e.g. /opengraph-image-15dal5?<hash>), which is what's
actually embedded in each page's <meta property="og:image"> tag. The
underlying bug the report surfaced is real regardless; verified by
requesting the actual hash-suffixed URL each page embeds (previously
404, now 200) for both a model and an integration page, on a real
production build.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Sibling Reviewed by Cursor Bugbot for commit d23eabe. Configure here. |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d23eabe. Configure here.
Greptile SummaryThis PR fixes missing OG image static params for landing pages. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "fix(landing): fix 404ing OG images for e..." | Re-trigger Greptile |
Greptile SummaryThis PR adds static params for landing-page OG image routes. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "fix(landing): fix 404ing OG images for e..." | Re-trigger Greptile |
Summary
/models/{provider}/{model}/opengraph-imageand/integrations/{slug}/opengraph-imageroute 404ing (~230 pages total, flagged by an SEO crawl of ~110 model pages plus every integration)page.tsxsetsdynamicParams = falsefor these routes, but Next doesn't sharegenerateStaticParamsbetween a page and its sibling metadata routes (opengraph-image.tsx) - since none of the three OG image files had their owngenerateStaticParams, every param was "unknown" and 404dgenerateStaticParamsto all three affectedopengraph-image.tsxfilesType of Change
Testing
Verified on a real production build - the exact URLs in the SEO report (bare
/opengraph-image, no suffix) aren't actually how Next serves these; the real URL has a build-generated hash suffix embedded in each page's<meta property="og:image">tag. Confirmed via curl that the actual embedded URL for both a model page and an integration page went from 404 to 200 after the fix.Checklist