Building Production Software

Open Graph Images and Link Previews: Sizes, Tags and Testing

When someone shares your link, the preview is your first impression. A handful of tags and one correctly sized image decide whether it looks considered or broken. This guide covers what to set and how to check it.

By Rahul D SarkerPublished November 14, 2026Updated November 14, 20266 min read

Part of our Building Production Software series. Start with Production-Grade Software: Engineering Practices That Prevent Technical Debt.

The Short Answer

What size should an Open Graph image be?

Use 1200 by 630 pixels, a ratio of about 1.91 to 1. Meta recommends at least 1200 by 630 for sharp display on high-resolution screens, with 600 by 315 as the minimum for a large preview. Set og:title, og:description, og:image and og:url on every page, add the image width and height, and keep important content away from the edges.

Open Graph is a set of tags in a page’s head that tell other platforms how to present a link. Facebook introduced it, and LinkedIn, Slack, WhatsApp, iMessage, Discord and X all read it. Without the tags, each platform guesses, usually badly.

1200 × 630Recommended image size in pixels for sharp link previewsMeta for Developers
600 × 315Minimum size for a large image previewMeta for Developers
200 × 200Smallest image Meta will accept at allMeta for Developers

The Tags That Matter

Open Graph and related tags
TagPurposeNotes
og:titleThe headline of the previewCan differ from the page title; write it for sharing
og:descriptionOne or two lines under the titleTruncated differently on each platform
og:imageThe image addressMust be an absolute URL that loads without logging in
og:urlThe canonical address of the pageShares of variants are counted together
og:typeThe kind of content“website” for most pages, “article” for posts
og:site_nameYour brand nameShown above or below the title on some platforms
og:image:width and og:image:heightImage dimensionsLets the preview render correctly the first time a link is shared
og:image:altA text description of the imageFor people using screen readers
twitter:cardCard style on XSet to “summary_large_image” for a large preview

The Open Graph protocol defines title, type, image and URL as the basic properties. X has its own card tags but falls back to Open Graph for title, description and image, so in most cases you need only add twitter:card.

Image Size and Safe Area

Meta’s documentation recommends images of at least 1200 by 630 pixels, and that size works well everywhere else too. The complication is cropping: some surfaces show a square or a narrower crop.

  • Keep text and logos in the centre. Leave a margin of roughly 10% on every side.
  • Use large type. Previews are often shown at a third of their size or less; text must be readable on a phone.
  • Limit the words. A title of five to eight words reads at a glance.
  • Check contrast. Previews appear on both light and dark backgrounds.
  • Use PNG or JPEG. Both are supported everywhere; SVG is not.
  • Keep the file small. A few hundred kilobytes at most, so crawlers fetch it quickly.

One Image for the Site, or One per Page?

A single site-wide image is the minimum. It guarantees every shared link looks deliberate. But the same picture on every link gives readers no reason to click a particular one, and a feed of your articles all looks identical.

Approaches to share images
ApproachEffortResult
One image for the whole siteMinutesConsistent, but every link looks the same
Hand-designed image per pageHigh; a designer for every articleBest quality; does not scale
Template generated at build or request timeA day of development, onceEach page gets its own title on a branded template
An image generation serviceAn integrationThe same result without building the generator

Generated images are the practical choice for any site with more than a few dozen pages. A template takes the page title and category and renders them onto a branded background. Frameworks such as Next.js include tools for this, and services exist for teams that would prefer not to build it. Loomstrat Labs runs one, UseOpenGraph, and this site generates a separate image for each guide the same way.

Implementation Checklist

  1. 1

    Set site-wide defaults

    Title, description, image, site name and card type in the base layout.

  2. 2

    Override per page

    Each page sets its own title, description, URL and image.

  3. 3

    Use absolute URLs

    Including the protocol and domain. Relative paths fail on most platforms.

  4. 4

    Declare width and height

    So the first share renders with the image.

  5. 5

    Make sure crawlers can fetch it

    The page and image must be public, not behind a login, and not blocked in robots.txt.

  6. 6

    Render the tags on the server

    Most platform crawlers do not run JavaScript, so tags added in the browser are invisible to them.

  7. 7

    Set a canonical URL

    So tracking parameters do not create separate previews.

Open Graph tags sit alongside titles, descriptions and structured data. Our technical SEO guide covers the rest of the page head.

Testing and Refreshing Previews

Platforms cache previews, sometimes for days. If you change an image and still see the old one, the cache is the cause. Each major platform provides a tool that fetches the page fresh and shows what it found.

Preview testing tools
PlatformToolUse it to
Facebook and InstagramSharing DebuggerSee the tags Meta read and re-scrape the page
LinkedInPost InspectorPreview the post and refresh LinkedIn’s cache
Slack, WhatsApp, iMessagePaste the link in a private chatCheck the real result; add a query string to bypass the cache
AnyView the page sourceConfirm the tags are in the HTML the server sends

Run the Sharing Debugger and LinkedIn Post Inspector before any launch announcement. It takes two minutes and avoids the launch post going out with a blank grey box. Our MVP launch strategy guide has the wider checklist.

Common Problems

Symptoms and fixes
SymptomLikely causeFix
No image at allRelative URL, blocked crawler or image behind a loginUse an absolute, public URL
Old image keeps appearingPlatform cacheRe-scrape with the platform’s tool
Small thumbnail instead of a large imageImage too small or dimensions not declaredUse 1200 by 630 and add width and height tags
Text cut offContent too close to the edgesKeep within the central safe area
Wrong title or descriptionMissing tags, so the platform guessedSet og:title and og:description explicitly
Works on Facebook, not on XNo card type setAdd twitter:card with summary_large_image
Tags present in the browser but not picked upTags added by JavaScriptRender them on the server

Frequently Asked Questions

What is the best Open Graph image size?

1200 by 630 pixels. It is the size Meta recommends for high-resolution displays and it displays well on LinkedIn, X, Slack and WhatsApp.

What are Open Graph tags?

Meta tags in a page’s head, such as og:title, og:description and og:image, that tell social platforms and messaging apps how to display a link to the page.

Why is my link preview not showing an image?

The usual causes are a relative image URL, an image or page the platform’s crawler cannot reach, an image that is too small, or a cached earlier version of the page.

How do I refresh a link preview on LinkedIn or Facebook?

Use LinkedIn’s Post Inspector or Meta’s Sharing Debugger. Each fetches the page again and updates the cached preview.

Do I need separate tags for X (Twitter)?

Only twitter:card, set to summary_large_image for a large preview. X falls back to the Open Graph title, description and image.

Do Open Graph tags affect SEO?

Not directly as a ranking factor. They affect how links look when shared, which influences clicks and how often content is passed on.

Have a build brief already forming in your head?

Loomstrat Studio scopes, builds, and hands over production software in 3–6 weeks - fixed price, 100% repository ownership.

  • Reply within 24 hours
  • Fixed price before we start
  • Zero technical debt guarantee