Skip to main content

Confirm

Are you sure?

Glossary

og:image

The image tag that makes a shared link look like it was meant to be shared.

By · Last updated: September 2026

TL;DR

og:image is the Open Graph meta tag whose content is the absolute URL of the image a link preview should show. An image of 1200 × 630 pixels, a 1.91:1 ratio, displays well on Facebook, LinkedIn and most chat apps. Without it, apps pick an image from the page or show none.

Free plan, no credit card. 1,000 credits a month.

How it works

The tag and its companions

og:image, fully described
<meta property="og:image" content="https://example.com/og/pricing.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="URLpipe pricing: four plans from free to Scale">

Width and height let an app lay out the card before the image has downloaded, which some apps need on the first share. og:image:alt is read by screen readers where the card supports it. og:image:secure_url exists for HTTPS but is redundant when og:image is already an https URL.

In practice

Getting it right

  • 1200 × 630 px (1.91:1). X's summary_large_image crops to 2:1, so keep text away from the top and bottom edges.
  • An absolute https URL the preview fetcher can download without cookies — not behind a login, a bot check or a hotlink rule.
  • PNG or JPEG; keep it well under a few megabytes. Some apps skip large images.
  • A distinct image per page. One logo for the whole site is why every shared link looks the same.

Many sites generate these images: a template rendered with the page's title, captured as a PNG at build time or on first request.

URLpipe

With URLpipe

/meta returns main_image_url: the page's og:image, falling back to twitter:image and then the JSON-LD image, as an absolute URL. Run it across your pages to find the ones with no image or a default one.

To make one, /screenshot can capture a single element of a template page by selector, at a fixed viewport and scale:

POST /screenshot
{
  "url": "https://example.com/og-template?title=Pricing",
  "sync": true,
  "screenshot_options": { "selector": "#card", "viewport_width": 1200, "viewport_height": 630, "format": "png" }
}

The response's X-Result-Url is a link to the image that needs no key and works for 30 days — use it for previews, or copy the image to your own storage for anything permanent.

FAQ

Frequently asked questions

What size should an og:image be?
1200 × 630 pixels, a 1.91:1 ratio. It displays well on Facebook, LinkedIn and most chat apps, and survives X's 2:1 crop.
Can og:image be an SVG?
Don't rely on it. Most preview services expect PNG, JPEG or WebP; SVG is widely unsupported.
Why does Facebook show an old og:image?
It caches previews. Changing the tag affects new scrapes; use Facebook's Sharing Debugger to make it fetch the page again.

See it on your own pages.

Free plan, no card. Confirm your email and your API key is live — you'll be making real requests in minutes.