Why LinkedIn shows blank cards for React apps and how to fix it
Social media crawlers like LinkedInBot and Twitterbot do not execute JavaScript, meaning they only read the raw HTML returned by the server. React or Vite apps without server-side rendering inject OpenGraph meta tags after client hydration, which happens too late for bots to capture. To display proper link previews, meta tags must be present in the initial HTML, achievable through frameworks like Next.js, Remix, or Astro. A developer encountered this issue and built ogcraft.dev, a tool that scrapes raw initial HTML to preview what crawlers see and generates dynamic OG images via a single embed tag without requiring headless browsers. The tool uses CDN caching and reads existing page tags to render optimized social preview cards on the fly.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in