OG image size: Open Graph 1200 × 630
Open Graph image dimensions for Facebook, LinkedIn and X: 1200 × 630 px, 1.91:1, under 8 MB. The og:image tags to copy and how to refresh a preview.
· Updated · 4 min read

For a link preview, make the Open Graph image at least 1200 by 630 pixels, keep it close to a 1.91 to 1 ratio, set the dimensions and an alt text in the tags, and serve it as a JPEG or PNG. Meta says 1200 by 630 is the size for high-resolution screens, and that 600 by 315 is the smallest size that gets the large preview.
Below are the tags, the numbers from Meta's documentation, and one change I made on this blog after checking how well WebP works in link previews.
The tags#
The Open Graph protocol says every page needs four properties: og:title, og:type, og:image and og:url. For the image, it also defines optional properties:
og:image:widthandog:image:height, in pixelsog:image:type, the MIME typeog:image:alt, a description of the image's contents. The protocol says pages that specifyog:imageshould also specifyog:image:alt.
Add og:description for a one or two sentence summary and og:site_name for the site's name.
X (formerly Twitter) reads its own twitter:* tags, and this site sets twitter:card to summary_large_image with the same image. X's documentation did not load for me, so I do not quote its size limits here.
Size, ratio and weight#
Meta's page on images in link shares says:
| What | Value |
|---|---|
| Recommended size | at least 1200 × 630 pixels |
| Smallest size for the large preview | 600 × 315 pixels |
| Smallest allowed | 200 × 200 pixels |
| Aspect ratio | as close to 1.91:1 as possible, so the whole image shows in Feed |
| File size | no more than 8 MB |
To crop any picture to exactly 1200 × 630 and see its file size before you upload it, open the Open Graph preset of the Image Resizer.
Smaller images still display, but much smaller. Setting og:image:width and og:image:height lets the crawler render the image without downloading and processing it first.
Caching: a new image needs a new URL#
Meta caches images by URL. The crawler has to see an image at least once before it can be rendered, and you can pre-fetch a page through the Sharing Debugger. If you replace an image, use a new URL for the new one, and note that updating the image for a URL does not update the preview of old shares.
Meta also says not to remove old images, because existing shares may still point to them, and that its crawler only accepts gzip and deflate encodings.
Which format#
Meta's page does not list the supported file formats. Sources outside the platforms disagree about WebP. One round-up I found, ctrl.blog's piece on WebP and Open Graph, reports that Facebook's documentation lists JPEG, PNG and GIF, while Facebook and its apps do show WebP previews in practice. X's documentation is said to support WebP. For LinkedIn, Slack and some WhatsApp clients, sources conflict or are old. None of these is an official specification for those platforms.
JPEG and PNG are the formats no source disputes, so I use JPEG.
What I changed on this blog#
Every post here has a 1200 × 630 WebP cover that shows on the page. I used to give that same file to the og:image tag. After reading the sources above, I could not show that every preview crawler handles WebP, so each post now also has a JPEG copy, and the tags point to it. The page still shows the WebP.
A short script writes the copies:
await sharp(cover)
.resize(1200, 630, { fit: "cover" })
.jpeg({ quality: 86, mozjpeg: true })
.toFile(join(root, slug, "og.jpg"));
The build also fails if a published post has no JPEG, so a new post cannot go out without one. The image reference carries the width, the height and an alt text:
image: { url: ogImagePath(post.slug), alt: post.coverAlt, width: 1200, height: 630 },
The free tools on this site have their own social cards, drawn at 1200 × 630 in a headless Chromium from the tool's name and category, as PNG files. That is the card you see on the cover of this post.
Test before you share#
- Run the URL through Meta's Sharing Debugger.
- Look at the preview in the apps where your links get shared. The platforms use different crawlers, and a cached preview can hide a fix.
- Check that the image URL returns a 200, is public and is not blocked by
robots.txt.
A precaution, not a proven fix#
I did not test the JPEG and WebP versions in every platform's preview, so my change is a precaution and not a fix for a failure I saw. The format information comes from third-party round-ups.