Skip to content
Web platform

The Page Looked Right. The Link Card Was Still Broken

A page can look perfect in the browser while LinkedIn or Slack show a broken card. The fix starts by separating what your code controls from what the platform caches.

Get fix-social-link-previews on npm
3 min read0 comments
Website

A correct web page beside a crawler view that sees only a broken link card

The browser and the crawler read different pages

A familiar bug report: the page looks right, but when someone shares the link on LinkedIn, the card has no image, the wrong title, or an old preview. The page is fine. The link card is not.

The browser runs JavaScript, carries your session and renders the final page. A link-preview crawler fetches raw HTML, does not run your app and has no login. If the metadata only exists after hydration, or the image sits behind authentication, the crawler simply does not see it.

Test the HTML a crawler receives, not the page you see.

Implementation problems and cache problems need different fixes

I built the fix-social-link-previews agent skill around one distinction. Some failures are implementation eligibility: missing or client-only Open Graph tags, relative image URLs, an image that is too small, unreachable, or not the format its extension claims. Those are your code's problems.

Other failures are platform cache: the implementation is correct now, but the platform still holds an old card. No code change fixes that. You refresh it through the platform's own tools, such as LinkedIn's Post Inspector.

Mixing the two up is how teams "fix" correct metadata three times while the real issue is a stale cache, or wait on a cache that will never refresh because the tags are still wrong.

Audit the raw response, then make the smallest repair

The skill audits the raw HTML, the meta tags and the image response itself. It checks that metadata is server-rendered, that URLs are absolute and reachable, and it validates image dimensions from the actual bytes for PNG, JPEG and supported WebP, rather than trusting a file extension.

Repairs preserve metadata that is already valid and use the framework's native way of setting tags. New preview assets are standardised at 1200×630. Results come back with explicit exit codes, so an agent can tell "fixed locally", "verified on the deployed site" and "blocked by platform cache" apart.

What it never does is promise a specific platform layout. Social platforms choose and cache cards with their own rules, and pretending otherwise would be a false claim.

The five checks I run first

Are the tags in the server HTML? Is og:image an absolute https URL? Is the image at least 1200×630 and really the type it claims? Can it be fetched without a login or redirect? And only after all four pass: is this just the platform's cache?

That order matters. The first four are yours to fix. The last one is not, and you only get to blame it once the first four are clean.

Working through a similar challenge?

Share your context, constraints, and timeline to start a focused conversation.