OG Image Sizes: The Complete Guide for 2026

Published: (May 10, 2026 at 09:00 PM EDT)
3 min read
Source: Dev.to

Source: Dev.to

Quick answer: 1200 × 630 pixels
Remember this size—it works on every major platform without cropping or distortion.

Platform image specifications

PlatformRecommended sizeMinimum sizeAspect ratioMax file size
Facebook1200 × 630600 × 3151.91:18 MB
Twitter/X (large card)1200 × 628300 × 1572:15 MB
Twitter/X (summary)240 × 240144 × 1441:15 MB
LinkedIn1200 × 627200 × 2001.91:15 MB
Slack1200 × 630Any1.91:1No hard limit
Discord1200 × 630Any1.91:18 MB
WhatsApp1200 × 630300 × 2001.91:15 MB
iMessage1200 × 630Any1.91:1No hard limit
Pinterest1200 × 630200 × 2001.91:110 MB

Bookmark this table for quick reference.

Why 1200 × 630 works everywhere

  • In 2010 Facebook introduced the Open Graph protocol and settled on a ~1.91:1 aspect ratio for link preview images.
  • Subsequent platforms (Twitter, LinkedIn, Slack, Discord, etc.) adopted the same or a very close ratio, so a single 1200 × 630 image displays correctly across them.
  • The 1200 px width ensures crisp rendering on high‑DPI (Retina) displays. Feed cards are typically shown at ~600 px wide, giving a 2× pixel density for sharp text and gradients.

Image format recommendations

FormatWhen to use
PNGImages with text, solid colors, or sharp edges.
JPEGPhotographic images; better compression for complex colors.
WebPInconsistent support—prefer PNG or JPEG for maximum compatibility.
SVGNot supported for OG images; most platforms will ignore it.

Safe zone and typography guidelines

  • Safe zone: Keep all important visual elements at least 60 px away from each edge. Effective content area ≈ 1080 × 510 px.
  • Typical display size: OG images appear at 400–600 px wide in feeds.
  • Title text: Minimum 48 px (at 1200 px width).
  • Description text: Minimum 28 px (at 1200 px width).
  • Text limits: 2–3 lines for the title; high contrast (e.g., white on dark background or vice‑versa).

Common pitfalls

  1. Using a square image (1:1). It will be aggressively cropped—always use 1200 × 630.
  2. File size too large. Aim for ≤ 1 MB; tools like TinyPNG or ImageOptim help compress without quality loss.
  3. Relative URLs in meta tags. Provide absolute URLs starting with https://.
  4. Caching issues. Platforms cache OG images aggressively; use each platform’s debugger to force a refresh.
  5. Missing og:image:width and og:image:height. Supplying these dimensions speeds up rendering.

Debugging tools

  • Facebook Sharing Debugger
  • Twitter Card Validator
  • LinkedIn Post Inspector
  • opengraph.xyz – (preview across multiple platforms)

Scalable OG image generation options

ToolDescription
@vercel/ogJSX‑to‑PNG on the edge; free and self‑hosted.
CloudinaryDynamic transformations with text overlay capabilities.
ogimg.xyzDedicated API; free tier includes 50 images/month.
Puppeteer / PlaywrightScreenshot‑based approach; flexible but slower.

Summary checklist

  • Size: 1200 × 630 px
  • Format: PNG (or JPEG for photos)
  • File size: ≤ 1 MB
  • Safe zone: 60 px margin on all sides
  • Meta tags: Include og:image, og:image:width, og:image:height with absolute URL
  • Testing: Verify with platform‑specific debugger tools before publishing

Following these guidelines ensures your shared links look polished across all major social platforms.

0 views
Back to Blog

Related posts

Read more »