CogniPrep is a psychometric test practice site. It has 1,093 public URLs, and I went looking for the one place that decides what a link preview looks like.
There isn't one. There are thirteen.
No opengraph-image route anywhere
Next.js will generate a social card for you. Drop an opengraph-image.tsx into a route segment, draw whatever you like with JSX, and the framework renders it, hashes it, and writes the og:image tags.
This repository has none. Zero opengraph-image.* files, zero twitter-image.* files. What it has instead is a single JPEG committed to public/: 42,286 bytes, 1200 by 628 pixels, committed in July and unchanged since.
That is a defensible choice. A generated card per page costs a render at request time or a build step per URL, and 1,093 URLs is a lot of renders for a picture that says the product name. One static image is cheaper and it never breaks.
The problem is what happened next.
Thirteen places that build the same object
The root layout sets metadataBase, a title template and a default description. It sets no openGraph block at all, and Next does not synthesise one from your title. So every page that wants a card has to say so itself.
304 page.tsx files write the block out by hand. Twelve shared modules write it once for a whole family:
-
components/guides/guide-metadata.tsfor the employer guides -
components/games/TestPageShell.tsxfor the per-test pages -
lib/cheating/registry.tsfor the integrity guides -
components/answers/AnswerShell.tsx,components/tests/test-type-metadata.ts,components/interview/CompanyQuestionsShell.tsx,components/comparison/ComparisonShell.tsx,components/benchmarks/BenchmarkPage.tsx,components/shared/LegalPageShell.tsx,components/blog/article-metadata.ts -
lib/nl/registry.tsandlib/de/registry.tsfor the two non-English clusters
Thirteen implementations of one object. The absolute string https://cogniprep.app/opengraph-image.jpg is typed out 300 times in page files, even though metadataBase is set and a leading slash would have been enough.
Coverage is complete, which is the surprising part. I fetched all 1,093 live URLs and every single one answers 200 with an og:image. Thirteen separate hands each remembered. But they did not agree.
The numbers from the crawl
All 1,093 pages, og:image by value:
| Value | Pages |
|---|---|
/opengraph-image.jpg | 972 |
/landing/image.webp | 121 |
The 121 are exactly the articles under /blogs. Their builder is components/blog/article-metadata.ts, and it is the only one of the thirteen that reaches for a different file:
const OG_IMAGE = `${BASE_URL}/landing/image.webp`; Then it declares the dimensions:
images: [{ url: OG_IMAGE, width: 1200, height: 750, alt: post.title }], public/landing/image.webp is 8000 by 5000 pixels. It is the landing page hero, 95,022 bytes of WebP, and the aspect ratio does happen to match 1200 by 750, so the declared numbers are proportionally right and absolutely wrong by a factor of six and a half.
Two things follow. The declared size is a hint scrapers use for layout before the bytes arrive, so for 121 pages it is a claim about a file six and a half times larger in each dimension than the one described. And the format is the one choice on the site that nobody can fully verify: guidance on whether every preview crawler renders a WebP og:image still disagrees with itself, which is exactly why the other 972 pages use a JPEG. The most shareable pages on the site are the ones relying on the format with the least settled support.
The height tag makes the split visible without opening any source:
og:image:height | Pages |
|---|---|
| 628 | 972 |
| 750 | 121 |
Six pages that disagree with themselves
twitter:image tells the same story one step further. 966 pages point it at the JPEG and 127 at the WebP, which is six more than the 121 blog articles.
Those six are the home page plus /interview, /assessment-centre-practice, /psychometric-tests, /pre-employment-tests and /game-based-assessments. Each one hand-writes an openGraph block naming the JPEG and a twitter block naming the WebP, a few lines apart in the same file. Nobody chose that. It is what happens when the two blocks are copied from different places.
And one tag that only 600 pages have
og:image:type is emitted when the image object carries a type field. Nine of the twelve builders set type: 'image/jpeg'. Three do not: the blog builder, the comparison builder and the integrity-guide registry. Eight of the 304 hand-written blocks set it.
Across the live site: present on 600 pages, absent on 493. The absences are 215 employer guides, 122 blog pages, 70 provider hubs, 70 integrity guides, 8 comparison pages and eight singletons.
Nothing breaks. og:image:type is a hint, and a scraper that fetches the bytes learns the type from the response. But 600 against 493 is a clean measurement of how much drift thirteen implementations accumulate when nothing asserts they match.
What I would change
Not "extract a helper", because the helper exists twelve times over. The thing worth having is a test, because the shapes here are all data:
- every
og:imageresolves to a file that exists inpublic/ - the declared width and height equal the file's real dimensions
-
twitter:imageequalsog:imageon every page - the image is a format every major scraper renders
That is four assertions over one crawl, and all four of the findings above would have failed at least one of them.
See it
Nothing here needs a login or a build.
View source on a blog article and search for og:image. You get /landing/image.webp at a declared 1200 by 750.
Now view source on the pricing page. Same site, same chrome, /opengraph-image.jpg at 1200 by 628, and a full twitter:image block with its own width and height.
Then open the home page and read both blocks together: og:image is the JPEG, twitter:image is the WebP, in the same document.
Finally, fetch the two images and check the headers. One is 1200 by 628 as declared. The other is 8000 by 5000, declared as 1200 by 750 on 121 pages.
