Open Graph images and meta tags: sizes and tags for every platform

The image sizes, tags, and caching quirks for X, LinkedIn, Facebook, Slack, Discord, and iMessage, so every shared link looks right.

Updated October 13, 20267 min readFor: Anyone who shares links

Short version: one 1200×630 PNG or JPG, an absolute https URL in og:image, and twitter:card set to summary_large_image. Check your page in the meta tag checker to see previews for Google, X, LinkedIn, and Slack.

The tags you need

<meta property="og:type" content="website" />
<meta property="og:url" content="https://example.com/page" />
<meta property="og:title" content="Short, specific title" />
<meta property="og:description" content="One or two sentences." />
<meta property="og:image" content="https://example.com/og/page.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="What the image shows" />
<meta name="twitter:card" content="summary_large_image" />
  • Use an absolute URL for og:image. Relative paths fail on most platforms.
  • Width and height tags help some platforms render the preview on the very first share.
  • The tags must be in the server HTML. Crawlers for social apps do not run JavaScript.

Sizes by platform

PlatformRecommendedNotes
Facebook1200×630Minimum 600×315 for a large preview.
LinkedIn1200×6271200×630 works; caches for days, use Post Inspector.
X (Twitter)1200×630 (displays near 2:1)Needs twitter:card summary_large_image. Under 5 MB.
Slack1200×630Uses og: tags; shows site name from og:site_name.
Discord1200×630Large image needs summary_large_image; theme-color may set the embed's accent color.
iMessage / WhatsApp1200×630Keep the file small (a few hundred KB) so it loads on mobile data.

Designing an image that gets clicks

  • Big, short headline: 3 to 8 words, readable at thumbnail size.
  • Brand mark and a consistent layout so people recognize your links in a feed.
  • High contrast between text and background; feeds are noisy.
  • Keep text away from the outer ~60 pixels; some apps crop or round corners.
  • Do not repeat the title exactly; many platforms already show the title next to the image.

Caching and debugging

Every platform caches previews, sometimes for a week. If you fix a tag after sharing, the old preview can stick. Re-scrape with Facebook's Sharing Debugger or LinkedIn's Post Inspector, or change the image URL. Before you share, check the HTML your server actually returns, which is exactly what our meta tag checker reads.

Generating images per page

Blogs, docs, and directories benefit from a unique image per page with the page title on it. Frameworks make this easy: Next.js has the opengraph-image file convention and ImageResponse, and services such as Vercel OG or Cloudinary can render images from a template. Generate them at build time when possible so they are fast and cacheable.

Questions

What is the best Open Graph image size?

1200×630 pixels (1.91:1). It displays well on Facebook, LinkedIn, X, Slack, Discord, and iMessage. Keep important content in the center, since some apps crop the edges.

Can I use an SVG as og:image?

No. Most platforms do not render SVG previews. Use PNG or JPG (WebP works on many, but not all, platforms).

Why does my old image still show after I changed it?

Platforms cache previews. Use Facebook's Sharing Debugger and LinkedIn's Post Inspector to re-scrape, or change the image URL (for example add ?v=2) so it is fetched fresh.

Do I need both og: and twitter: tags?

X falls back to Open Graph tags for title, description, and image, but it needs twitter:card set to summary_large_image to show the large image layout. Add that one tag at minimum.

Tools for this guide