OG Image Sizes: The Complete Guide for 2026
Source: Dev.to
Quick answer: 1200 × 630 pixels
Remember this size—it works on every major platform without cropping or distortion.
Platform image specifications
| Platform | Recommended size | Minimum size | Aspect ratio | Max file size |
|---|---|---|---|---|
| 1200 × 630 | 600 × 315 | 1.91:1 | 8 MB | |
| Twitter/X (large card) | 1200 × 628 | 300 × 157 | 2:1 | 5 MB |
| Twitter/X (summary) | 240 × 240 | 144 × 144 | 1:1 | 5 MB |
| 1200 × 627 | 200 × 200 | 1.91:1 | 5 MB | |
| Slack | 1200 × 630 | Any | 1.91:1 | No hard limit |
| Discord | 1200 × 630 | Any | 1.91:1 | 8 MB |
| 1200 × 630 | 300 × 200 | 1.91:1 | 5 MB | |
| iMessage | 1200 × 630 | Any | 1.91:1 | No hard limit |
| 1200 × 630 | 200 × 200 | 1.91:1 | 10 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
| Format | When to use |
|---|---|
| PNG | Images with text, solid colors, or sharp edges. |
| JPEG | Photographic images; better compression for complex colors. |
| WebP | Inconsistent support—prefer PNG or JPEG for maximum compatibility. |
| SVG | Not 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
- Using a square image (1:1). It will be aggressively cropped—always use 1200 × 630.
- File size too large. Aim for ≤ 1 MB; tools like TinyPNG or ImageOptim help compress without quality loss.
- Relative URLs in meta tags. Provide absolute URLs starting with
https://. - Caching issues. Platforms cache OG images aggressively; use each platform’s debugger to force a refresh.
- Missing
og:image:widthandog: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
| Tool | Description |
|---|---|
| @vercel/og | JSX‑to‑PNG on the edge; free and self‑hosted. |
| Cloudinary | Dynamic transformations with text overlay capabilities. |
| ogimg.xyz | Dedicated API; free tier includes 50 images/month. |
| Puppeteer / Playwright | Screenshot‑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:heightwith 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.