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.
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
| Platform | Recommended | Notes |
|---|---|---|
| 1200×630 | Minimum 600×315 for a large preview. | |
| 1200×627 | 1200×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. |
| Slack | 1200×630 | Uses og: tags; shows site name from og:site_name. |
| Discord | 1200×630 | Large image needs summary_large_image; theme-color may set the embed's accent color. |
| iMessage / WhatsApp | 1200×630 | Keep 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
More guides
The website launch checklist (2026)
48 checks across SEO, sharing, accessibility, AI search, speed, security, and legal. Tick them off as you go and download your progress.
Read · 12 min →European Accessibility Act: a practical guide for small teams
Who the EAA applies to, what it requires, and a step-by-step plan to work toward compliance without an enterprise budget.
Read · 10 min →Robots.txt for AI crawlers: get cited by ChatGPT, Perplexity, and Claude
The difference between AI search and AI training bots, the exact robots.txt rules to use, and the mistakes that make sites invisible to AI answers.
Read · 8 min →