DEV Community

Dimitry Toronto Moscow
Dimitry Toronto Moscow

Posted on

og:image not showing on LinkedIn? The 6 causes I check, in order

A missing or wrong link preview on LinkedIn, Slack, X or Facebook almost always comes down to one of six things. In the order I check them:

  1. The image is SVG. None of LinkedIn, X or Facebook render SVG og:image. Use PNG or JPG.
  2. The URL is relative. og:image="/card.png" fails; crawlers need an absolute https:// URL.
  3. The bot is blocked. Cloudflare Bot Fight Mode / WAF rules often return 403 to facebookexternalhit or LinkedInBot. Check with curl -sI -A "LinkedInBot/1.0" https://your.site/page and look in your CDN's security events.
  4. The image redirects or 404s. The page can be fine while the image host blocks bots or redirects to a login.
  5. Size and type. LinkedIn's large card wants ≥1200×627; declare og:image:width/height so the first share renders.
  6. Cache. Platforms cache the first scrape. Re-scrape in LinkedIn Post Inspector / Facebook Sharing Debugger after fixing.

Also: tags added by client-side JavaScript are invisible to most social bots, and og: tags should use property=, not name=.

Free lint for 1, 2, 5 and the markup mistakes

I put the markup checks into a single page that runs in your browser (nothing is uploaded): paste your <head>, get PASS/WARN/FAIL lines.
→ https://dimonch-byte.github.io/og-lint/

It can't see 3, 4 or 6, because those depend on what the crawler actually got back.

Disclosure

I build SharePack. Its free check requests your page the way social bots do and shows what came back. If something's broken, the optional $29 one-time pack has corrected tags and a correctly sized image set for your page. It's not a design tool: https://sharepack.adjudi.com/?utm_source=devto&utm_medium=article&utm_campaign=sharepack-intent-w2&utm_content=og-6-causes

Top comments (0)