Encited logo
PricingTalk to sales
What Is Open Graph? OG Meta Tags, Image Sizes and Twitter Cards (2026)

What Is Open Graph? OG Meta Tags, Image Sizes and Twitter Cards (2026)

Nov 13, 2026November 13, 2026·by Aki from Encited

Open Graph is the set of og: meta tags that controls link previews. The four required tags, image sizes, Twitter cards, and how to test what platforms see.

Open Graph is a set of meta tags that tells Facebook, LinkedIn, X, Slack, WhatsApp and other apps what to show when someone shares your link: the title, the description, the image and the URL. The tags go in the page's <head> as <meta property="og:..." content="...">. Facebook created the Open Graph protocol, and the apps that build link previews now read it. Without the tags, each app guesses, and the card shows the wrong image, a cut-off title or a bare URL.

You shared a link and the preview came out wrong, or someone on your team asked what "OG tags" are. The sections below cover the four tags every page needs, the optional ones worth adding, an image size that works on every platform, how Twitter cards relate to Open Graph, and how to test what each platform receives.

Key takeaways

  • Open Graph is the protocol behind link previews. Platforms read og: meta tags from your HTML to build the card.
  • Four tags are required: og:title, og:type, og:image and og:url. Add og:description as well, since LinkedIn lists it as required.
  • A 1200 by 630 pixel PNG or JPEG at an absolute https:// URL works on Facebook, LinkedIn and X.
  • X reads Open Graph tags when its own twitter: tags are missing. It still needs twitter:card to pick the card type.
  • Social crawlers read the HTML your server sends and don't run JavaScript, so tags that a JavaScript app adds in the browser often never reach them.
  • Platforms store each card. After a change, refresh it with the Sharing Debugger on Facebook and the Post Inspector on LinkedIn.

What is Open Graph and how does it work?

The Open Graph protocol lets "any web page become a rich object in a social graph", in the words of the official specification. Facebook created it so a shared page could show a title, an image and a description in the feed. LinkedIn, X, Threads, Slack, WhatsApp and Discord read the same tags today.

When someone pastes your URL, the platform's crawler requests the page, reads the og: tags in the <head>, downloads the image named in og:image and builds the card. Facebook's crawler identifies itself as facebookexternalhit, LinkedIn's as LinkedInBot and X's as Twitterbot. The platform stores the card, and later shares of the same URL reuse it until you ask for a fresh scrape.

Every tag follows one pattern:

html
CopyDownload
<meta property="og:title" content="What Is Open Graph?" />

property names the field and content holds the value. Open Graph tags use the property attribute. Twitter card tags use name, which is one of the few places the two sets differ.

What happens if a page has no Open Graph tags?

The platform guesses. Most fall back to the page's <title> element and meta description, then either pick an image from the page or show none. Some show the bare URL. Each platform guesses differently, so one link can look different in Slack, on LinkedIn and in WhatsApp. With the tags in place, every platform builds the card from the same values.

The four required Open Graph tags

TagWhat it holdsExample
og:titleThe title as it should appear in the cardWhat Is Open Graph?
og:typeThe kind of page: website, article, profile and othersarticle
og:imageThe absolute URL of the preview imagehttps://example.com/og/open-graph.png
og:urlThe canonical URL of the page, used as its permanent IDhttps://example.com/blog/open-graph

With a description added, they look like this in the <head>:

html
CopyDownload
<head>
<title>What Is Open Graph? | Example</title>
<meta property="og:title" content="What Is Open Graph?" />
<meta property="og:type" content="article" />
<meta property="og:image" content="https://example.com/og/open-graph.png" />
<meta property="og:url" content="https://example.com/blog/open-graph" />
<meta property="og:description" content="The tags that control your link preview, and how to test them." />
</head>

Three rules catch most mistakes:

  • og:image and og:url need absolute URLs that start with https://. A path such as /og.png works in your browser and fails in every scraper.
  • og:url should match the page's canonical URL, so every share of the page, with or without tracking parameters, points to the same object.
  • Each page needs its own values. Tags copied into every page give every link the same card.

To see which of these tags a page has, paste its URL into the OG Image Checker. It lists each tag it found and builds the Facebook, LinkedIn and X cards from the raw HTML, the same HTML a social crawler reads.

Optional Open Graph meta tags worth adding

TagWhat it does
og:descriptionOne or two sentences shown under the title. LinkedIn lists it as a required tag.
og:site_nameThe name of the site the page belongs to, such as your brand.
og:localeThe language and region of the tags, such as en_US, which is the default.
og:image:width and og:image:heightThe image size in pixels. Facebook uses them to show the image on the first share, before it has downloaded the file.
og:image:altA description of what the image shows, for people who use screen readers.
og:image:typeThe image's MIME type, such as image/png.
og:video and og:audioA video or audio file that goes with the page.

Open Graph types

og:type tells the platform what kind of thing the page is. Any page without it is treated as website.

TypeUse it for
websiteThe home page, landing pages and most other pages
articleBlog posts and news. It adds article:published_time, article:author, article:section and article:tag.
profileA page about one person, with profile:first_name, profile:last_name and profile:username
bookA book, with book:author and book:isbn
video.movie, video.episode, video.tv_show, video.otherPages built around a video
music.song, music.album, music.playlist, music.radio_stationPages built around music

Most sites need two of them: website for the home page and landing pages, and article for posts.

Open Graph image size and format

Make one image at 1200 by 630 pixels, save it as PNG or JPEG, and keep it well under 5 MB. Each platform crops a little differently, so keep text and logos away from the edges.

PlatformMinimumRecommendedRatioLargest file
Facebook600 × 315 for the large card, 200 × 200 for any card1200 × 6301.91:18 MB
LinkedIn1200 × 6271200 × 6271.91:15 MB
X, summary_large_image300 × 157Up to 4096 × 40962:15 MB

The Facebook figures come from Meta's image guidelines and the LinkedIn figures from LinkedIn's sharing help page. X has removed its card documentation from its developer site, so its figures are the ones that documentation listed.

A 1200 by 630 image matches the 1.91:1 ratio, and X trims about 30 pixels of height to fit 2:1. Two more rules from Meta apply everywhere: Facebook stores images by URL, so a new image needs a new file name, and its crawler has to fetch an image once before it can show it, which is why og:image:width and og:image:height help on the first share.

Open Graph vs Twitter cards

X (formerly Twitter) has its own set of tags, called Twitter cards. For links shared on X they do the job Open Graph does elsewhere, and X falls back to Open Graph when they're missing.

Twitter card tagFalls back toWhat it does
twitter:cardNothingThe card type: summary, summary_large_image, app or player
twitter:titleog:titleThe title on X
twitter:descriptionog:descriptionThe description on X
twitter:imageog:imageThe image on X
twitter:siteNothingThe X account of the site, such as @yourbrand
twitter:creatorNothingThe X account of the author

The four card types:

  • summary: a small square image next to the title and description.
  • summary_large_image: a large image above the title. This is the card most sites want.
  • app: a card that links to an app in the App Store or Google Play.
  • player: a card that plays video or audio inside the post.

With the Open Graph tags in place, X needs one more tag: twitter:card, because it has no Open Graph equivalent. Add twitter:site if you want the card tied to your account, and add the other twitter: tags only when X should show different values from everyone else.

html
CopyDownload
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@yourbrand" />

Open Graph, Twitter cards and schema.org side by side

Pages often carry the same title, description and image three or four times, for different readers. This table maps them:

FieldHTMLOpen GraphTwitter cardSchema.org JSON-LD
Title<title>og:titletwitter:titleheadline or name
Description<meta name="description">og:descriptiontwitter:descriptiondescription
ImageNoneog:imagetwitter:imageimage
URL<link rel="canonical">og:urlNoneurl
Kind of pageNoneog:typetwitter:card (card style)@type
Read byBrowsers and search enginesSocial and chat appsXGoogle and other search engines

The values can differ. A card title can be shorter than the <title> element, for example. The URLs should always agree.

Why Open Graph tags don't show up

Work through these in order. The first one accounts for most broken previews on modern JavaScript sites.

  1. JavaScript adds the tags. Social crawlers read the HTML your server sends and leave without running your scripts. Sites built with React, Vue or an AI website builder such as Lovable often send an almost empty HTML file, and the tags appear only after the page loads in a browser. Open the page with View Page Source, which shows what the server sent, and search for og:. The browser's element inspector shows the page after JavaScript ran, so it can show tags the crawler never got. The fix is to render the tags on the server for each route, or to pre-render each page so crawlers get finished HTML. For a Lovable site, the Lovable link preview guide covers both stacks.
  2. The image URL fails. A relative path, an image behind a login or on a protected path, or a file over the platform's size limit all show up as a missing image. Open the exact og:image URL in a private browser window.
  3. The page has the tags twice. A theme and an SEO plugin can each add an og:title. Several scrapers take the first tag they find and ignore the rest, so the value you edited may not be the one they read.
  4. The platform stored an old card. Your fix is live, and the platform still shows the card it built before. The next section covers how to refresh it.

To see the exact HTML one platform gets, request the page as its crawler with the Facebook crawler simulator. It sends the facebookexternalhit user agent and shows the status code, the raw HTML and the Open Graph tags that came back.

How to test Open Graph tags and refresh a cached preview

WhereToolWhat to do
Any platformOG Image CheckerPaste the URL to see the tags found and the Facebook, LinkedIn and X cards
FacebookSharing DebuggerPaste the URL and press Scrape Again. It fetches the page and stores the new card.
LinkedInPost InspectorPaste the URL. Each inspection fetches the page again.
Slack, WhatsApp, DiscordNoneShare the URL with a query parameter such as ?v=2 to get a fresh card while you test

The query parameter only helps you test. Real shares use the plain URL, so refresh the platforms that offer a tool, then drop the parameter.

Open Graph tags in Next.js, Nuxt and single-page apps

Frameworks that render on the server write the tags into the HTML that crawlers get. In the Next.js App Router, return them from generateMetadata for each route:

tsx
CopyDownload
// app/blog/[slug]/page.tsx
export async function generateMetadata({ params }) {
const { slug } = await params;
const post = await getPost(slug);
return {
title: post.title,
openGraph: {
title: post.title,
description: post.excerpt,
url: `https://example.com/blog/${slug}`,
type: "article",
images: [{ url: post.ogImage, width: 1200, height: 630 }],
},
twitter: { card: "summary_large_image" },
};
}

Next.js can also draw a different image for each page with ImageResponse from next/og, so you don't have to design one image per post.

In Nuxt, useSeoMeta sets the same fields:

ts
CopyDownload
useSeoMeta({
ogTitle: post.title,
ogDescription: post.excerpt,
ogImage: post.ogImage,
twitterCard: "summary_large_image",
});

A single-page app built with plain React or Vue is different. Libraries such as React Helmet change the tags in the browser, after the crawler has already left, so each route needs server rendering or pre-rendering before its tags reach the platforms.

Frequently asked questions

What is an Open Graph used for?

Open Graph controls how a link looks when someone shares it. Its tags set the title, description, image and URL that Facebook, LinkedIn, X, Slack, WhatsApp and Discord show in the preview card.

Do Open Graph tags affect SEO?

Open Graph tags aren't a Google ranking factor. They change how your links look on social platforms and in chat apps, and a clear card with the right image gets more clicks when someone shares the page.

Do I need Twitter card tags if I already have Open Graph tags?

Add twitter:card, because it chooses the card type and has no Open Graph equivalent. X reads the title, description and image from your og: tags when the matching twitter: tags are missing.

Can Open Graph tags go in the body?

Put them in the <head>. The specification places them there, and that is where scrapers look for them.

What is an example of Open Graph tags?

The block under the four required Open Graph tags is a complete example for a blog post: title, type, image, URL and description.

Google
Gemini
ChatGPT
Claude
Grok
Meta
Perplexity

Get your store ranked in AI

See how ChatGPT, Gemini, Claude and Perplexity recommend your products and which stores they pick instead.

Talk to sales
Avatar
How can we help?
Get instant answers to your questions or leave a message for an engineer will reach out
Ask AI about Encited
See our docs
Contact support
Leave a message
We'll get back to you soon
Avatar
Ask AI about Encited
Product questions, troubleshooting and
Thinking
Preview
Drop an image to attach
Powered by ReplyMaven