Fundamentals · 8 min read
What is an Open Graph image?
An Open Graph image is the preview card shown when a link is shared. Learn what og:image does, why 1200 x 630 is the standard, and how to add it correctly.
Updated
The short answer
An Open Graph image is the picture that appears when a link is shared on social platforms, messaging apps, and some search surfaces. You declare it with the og:image meta tag in the page's <head>, usually at 1200 x 630 pixels with a 1.91:1 aspect ratio. It is a separate asset from the page's hero image unless you deliberately point the tag at the same file.
- Standard size
- 1200 x 630 px (1.91:1)
- Defining tag
og:imagein the page head- Formats
- JPG, PNG, or WebP
- Safe file size
- Under 1 MB
- Required OG tags
- title, type, image, url
- Absolute URL
- Required in practice
On this page
- Where an Open Graph image appears
- What the og:image tag actually does
- Open Graph image vs. the image on your page
- Why 1200 x 630 is the standard
- What makes an Open Graph image work
- How to add an Open Graph image to a page
- How to test an Open Graph image
- Common mistakes
- Do Open Graph images affect Google rankings?
An Open Graph image is the visual part of a link preview. When someone pastes your URL into LinkedIn, X, Slack, Discord, WhatsApp, or iMessage, the app reads the page's meta tags and builds a card: title, description, domain, and image. The image is the part people notice first, and it is the part most sites leave to chance.
The name comes from the Open Graph protocol, originally introduced by Facebook in 2010 and now read by most social and messaging platforms. Some articles write the phrase as one word, opengraph image; it describes the same asset. The protocol does not describe a design system. It describes a small set of metadata fields that tell a platform what to show when a URL is shared outside the browser.
Where an Open Graph image appears
The same og:image can produce very different cards. Each platform picks its own container, crop, and text layout, which is why a design that looks correct on Facebook can lose its headline on X or Slack.
| Surface | Typical card | What it does with your image |
|---|---|---|
| Large link card | Crops to roughly 1.91:1; shows title, description, and domain | |
| Shared link card | Crops to 1.91:1; often shows a smaller image beside the copy | |
| X | summary_large_image card | Crops toward 2:1 in some timelines; keeps the centre |
| Slack | Unfurl | Shows a thumbnail or a large preview depending on the client and workspace |
| Discord | Embed | Uses the image as the embed thumbnail; can show a large preview |
| Link preview | Small square or wide preview, depending on the client | |
| iMessage | Rich link | Wide preview with title and domain |
| Google Discover | Article card | May use the page image when max-image-preview:large is allowed |
What the og:image tag actually does
The tag lives in the document head and points at an image URL. The platform fetches that URL independently when it builds the preview. That last detail explains most broken previews: the image has to be publicly reachable, not hidden behind a login, a local development host, or a signed URL that expires.
<head>
<meta property="og:title" content="A clearer way to ship" />
<meta property="og:description" content="What changed, why it matters, and what to try first." />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://example.com/blog/a-clearer-way-to-ship" />
<meta property="og:site_name" content="Example" />
<meta property="og:image" content="https://example.com/og/a-clearer-way-to-ship.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="Dark card with the headline: A clearer way to ship" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="A clearer way to ship" />
<meta name="twitter:description" content="What changed, why it matters, and what to try first." />
<meta name="twitter:image" content="https://example.com/og/a-clearer-way-to-ship.png" />
<meta name="twitter:image:alt" content="Dark card with the headline: A clearer way to ship" />
</head>The Open Graph protocol names four required properties: og:title, og:type, og:image, and og:url. og:description is optional in the specification but is used by nearly every platform, so leaving it out wastes the second most visible line in the card.
| Tag | Required? | What to put in it |
|---|---|---|
og:title | Yes | The headline people see. Keep it under about 60 characters. |
og:type | Yes | website, article, product, profile, or another registered type. |
og:image | Yes | An absolute URL to a public image, ideally 1200 x 630. |
og:url | Yes | The canonical URL of the page, not the image URL. |
og:description | Recommended | One or two sentences that add context to the headline. |
og:site_name | Recommended | The publication or product name. |
og:image:width / height | Recommended | The real pixel dimensions, so the platform can lay out the card before the image loads. |
og:image:alt | Recommended | A literal description of the image for accessibility. |
og:locale | Optional | en_US and similar. Useful on multilingual sites. |
Open Graph image vs. the image on your page
The og:image does not have to be the hero image, the first image in the article, or even an image that appears on the page. In fact, a purpose-built card is usually better: it can carry the headline, the brand mark, and a single supporting idea without inheriting the page's layout.
| Asset | Job | Typical size |
|---|---|---|
| Page hero | Sets the scene inside the page | Varies; often 1600 px wide or more |
| Open Graph image | Sells the link in a feed or chat | 1200 x 630 |
| Twitter card image | Sells the link on X | 1200 x 628 or the same 1200 x 630 file |
| Favicon | Identifies the tab | 32 x 32 and up |
| App icon | Identifies an installed app | 192 x 192 and 512 x 512 |
The exception is a page whose hero is already a well-composed 1.91:1 card with readable type. In that case, pointing og:image at it saves an asset. Just check the crop at small sizes before you ship.
Why 1200 x 630 is the standard
1200 x 630 is 1.904:1, close to the 1.91:1 ratio that Facebook, LinkedIn, and several other platforms use for large link cards. It is wide enough to hold a headline and a brand mark, large enough to stay sharp on high-density displays, and small enough to load quickly. X's large card is often described as 1200 x 628; the two-pixel difference does not matter in practice.
The ratio matters more than the exact dimensions. A 2400 x 1260 image has the same shape and twice the pixels. A 1200 x 1200 square does not: platforms will crop it, usually from the centre, and any text near the top or bottom can disappear. If you need one asset for every surface, design at 1200 x 630 and keep the important content inside the middle 80 percent.
What makes an Open Graph image work
- One idea. A headline of six to ten words beats a paragraph. The card is a billboard, not a summary.
- Type you can read at 300 px wide. If the headline disappears in a Slack thumbnail, it is too small.
- High contrast. Dark type on a light field or light type on a dark field. Avoid mid-tone gradients behind body text.
- A visible brand mark. The logo or domain tells people where the link goes before they read the title.
- Deliberate spacing. Text near an edge is the first thing a crop removes.
- A file under 1 MB. Smaller images load faster and fail less often. JPG or WebP is usually enough; use PNG when you need crisp flat colour.
The best cards are not always the most decorative. A solid background, one strong line of type, and a logo can outperform a busy illustration because it survives every container. If you want a system rather than one-off cards, start with a template and change the words, not the layout.
How to add an Open Graph image to a page
- 01Make the image. Use a template or a blank 1200 x 630 canvas. Export a JPG, PNG, or WebP under 1 MB.
- 02Upload it to a public URL. It must return HTTP 200 without a login. Do not use a local path or a data URL.
- 03Add the tags to the head. At minimum
og:title,og:type,og:image, andog:url. Add the image dimensions and alt text. - 04Add X card tags if you want control there.
twitter:card,twitter:title,twitter:description, andtwitter:image. - 05Fetch the page as a crawler. Confirm the tags are in the server-rendered HTML, not injected only after JavaScript runs.
- 06Test with each platform's debugger. Refresh the cache after changing an image at the same URL.
If you use a framework, the mechanics are the same; only the file changes. Next.js exposes the tags through its metadata API, WordPress plugins write them for you, and static HTML needs them written by hand. The Open Graph meta tags guide has a tag-by-tag reference, and the Next.js guide shows the App Router version.
How to test an Open Graph image
- Facebook Sharing Debugger shows the scraped tags and lets you re-scrape a URL. It is the most useful single check because it exposes exactly what the crawler sees.
- LinkedIn Post Inspector does the same for LinkedIn and reveals cache state.
- X composer preview is the practical check. Paste the URL into a draft post and look at the card before publishing.
- Slack and Discord refetch when you paste the URL again. If the old card persists, change the image filename or append a version query string.
- Your own browser is not a test. A page can look fine to you and still serve different tags to a crawler, especially when the tags are injected client-side.
Common mistakes
- Using a relative image path, or a URL that only works on your local machine.
- Pointing
og:imageat a page instead of an image file. - Serving an image behind authentication, hotlink protection, or a CDN rule that blocks social crawlers.
- Letting a CMS plugin and hand-written tags both emit
og:image, so the platform picks the wrong one. - Injecting the tags with client-side JavaScript only. Many crawlers do not run your app.
- Using a square image and losing the headline to a centre crop.
- Setting the image to 1200 x 630 in the tag but serving a 600 x 315 file, which looks soft on retina displays.
- Forgetting
og:url, so shares of syndicated copies all point at the original page.
Do Open Graph images affect Google rankings?
Not directly. Google has said Open Graph metadata is not a ranking signal, and Google's rich results use schema.org structured data rather than Open Graph. What Open Graph images do affect is how a link looks when it is shared: a clear card earns more clicks, and more clicks from real people can lead to more links and more discovery. That is an indirect effect, not a ranking switch.
There is one Google surface worth knowing about: Discover. Google may use a page's image for Discover cards, and allowing large image previews with max-image-preview:large keeps that option open. That is a different mechanism from og:image, but the same design rules apply: a clean, wide, high-contrast image with a readable subject.
Keep going
Frequently asked questions
Is an Open Graph image the same as a social preview image?
Yes, in everyday use. A social preview image, link preview image, and OG image all describe the picture declared by og:image. Twitter card images are the same idea with a different tag set.
What size should an Open Graph image be?
Use 1200 x 630 pixels with a 1.91:1 aspect ratio. It is the safest common shape for Facebook, LinkedIn, X, Slack, Discord, and messaging apps. Keep the important content inside the middle 80 percent so crops do not remove it.
Does the image have to be exactly 1200 x 630?
No. The ratio matters more than the exact pixels. Any 1.91:1 image works, including 2400 x 1260 for extra sharpness. Avoid square or very tall images unless you are targeting a platform that specifically uses that shape.
Can I use a JPG instead of a PNG?
Yes. JPG, PNG, and WebP are all widely accepted. JPG and WebP produce smaller files for photographic backgrounds; PNG is better for flat colour and crisp type. Keep the file under 1 MB where you can.
Why is my Open Graph image not showing?
The most common causes are a relative image URL, an image that returns a 404, tags injected only by client-side JavaScript, a conflicting second og:image from a plugin, or a cached preview. Start with the troubleshooting checklist and verify the raw HTML first.
Does Google use Open Graph images for search results?
Google does not use Open Graph for ranking and uses schema.org for most rich results. Some Google surfaces, including Discover, may use a page image, so it is still worth providing a clean, large, high-contrast asset.
Do I need separate tags for X (Twitter)?
X can fall back to Open Graph, but the twitter:* tags give you control over the card type, title, description, and image. If you care about how the link looks on X, add twitter:card and twitter:image at minimum.
Can an Open Graph image be a GIF or a video?
The Open Graph protocol is built around images. Some platforms support animated GIFs or video previews, but support is inconsistent. Use a static image for the preview and let the destination page carry the motion.
Sources and further reading
Written and maintained by GxAditya
The person who builds ogimg.in. Last updated . 8 min read.
Free, no account
Make the image, then copy the tags
Start from a template or a blank canvas. Export a 1200 x 630 PNG, JPEG, or WebP, and copy the Open Graph tags from the preview panel.