Open Graph tags: the preview card when you share a link

When a link is pasted into a chat or a feed, the app fetches the page and reads its Open Graph tags to draw a card with a title, a line of description and an image. Without the tags the link shows as a bare address, which reads as spam.

Open Graph tags are the meta lines in a page's head that chat apps, social feeds and messaging tools read when someone pastes a link, so they can draw a preview card instead of showing the raw address. og:title, og:description and og:image are the three that matter; the card they produce is the difference between a link people click and one they scroll past.

The markup. The highlighted line is the part this term is about.
The markup. The highlighted line is the part this term is about.

This guide covers why the card changes behaviour, the complete useful set of tags, sizing the image, how the tags relate to the title and meta description, and how to test what a link will look like before sending it.

<meta property="og:title" content="Weekly overview — week of 7 Sep">
<meta property="og:description" content="Signups, active teams, and where support time went.">
<meta property="og:image" content="https://example.com/og/weekly.png">
<meta property="og:url" content="https://example.com/weekly">

Four lines. With them, your link pasted into a channel becomes a card with a title, a sentence and a picture. Without them, it is a bare address.

Why an Open Graph preview card changes behaviour

In a busy channel the card is the message for most readers. It carries the title and the headline point in front of everyone scrolling past, and the ones who care click through.

Open Graph tags are meta lines in the head that chat apps and social feeds read to draw a preview card: title, description, image. Without them a shared link shows as a bare address.
Open Graph tags are meta lines in the head that chat apps and social feeds read to draw a preview card: title, description, image. Without them a shared link shows as a bare address.

A bare address carries nothing. It also looks like the kind of link people have been trained not to click. This is the practical difference between a message that gets engagement and one that gets scrolled past — and it is four lines.

It is also a large part of why a link beats a file: an uploaded file has no address to look up, so it can never have a card.

Sending the file itself ✗ Often filtered by mail security rules ✗ May open as plain text on a phone ✗ Every fix means a new attachment ✗ No way to know who opened it ✗ Recipient needs the right app Sending a link ✓ Passes through mail and chat ✓ Renders in the phone browser ✓ Fix once, link stays the same ✓ The address is the single source ✓ Any browser is enough
A file card shows nothing about its contents. A link with Open Graph tags shows a title, a line and an image.

The complete useful set

<!-- Open Graph -->
<meta property="og:type" content="article">
<meta property="og:title" content="Weekly overview — week of 7 Sep">
<meta property="og:description" content="Signups, active teams, and where support time went.">
<meta property="og:image" content="https://example.com/og/weekly.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="Four KPI cards and a bar chart of signup sources">
<meta property="og:url" content="https://example.com/weekly">
<meta property="og:site_name" content="Example">

<!-- one extra line for the card shape -->
<meta name="twitter:card" content="summary_large_image">

Points worth knowing:

og:image must be an absolute address. A relative path resolves to nothing for the app fetching it, and no image appears.

Declaring width and height lets the app reserve the space before the image arrives, which avoids a moment where the card is drawn without it.

og:image:alt is read by screen readers when the card is announced. Rarely set, and it costs nothing.

og:url should match your canonical address, so shares of the same page with different tracking parameters are treated as one.

The image

Property Value
Size 1200 × 630
Format PNG or JPEG
File size Under about 300KB
Minimum that shows at all Roughly 200 × 200

Design for the fact it will be displayed small, and often cropped. The title of the page repeated as large text in the image is more effective than a screenshot of the page, because a screenshot at card size is illegible.

Keep the important content away from the edges — different apps crop differently.

Caching, and how to refresh

Once an app has fetched your card it caches it, sometimes for a long time. Editing the page does not update the card already shown in old messages.

Most platforms provide a debug tool that refetches on demand — that is the only reliable way to force an update. Plan on getting the card right before the link is widely shared, rather than after.

A quick self-check

Paste the link into a private message to yourself in whichever app matters most. That is the real test, and it takes ten seconds.

Check three things: the title is not truncated in a way that loses its meaning, the image is not illegibly cropped, and the description is a sentence rather than the first words of the page.

Difference from the description meta tag

og:description is for the sharing card. <meta name="description"> is for search results. They can be the same sentence and often should be, but one does not substitute for the other — see meta descriptions.

Three Open Graph mistakes that cost the most

An image behind a login. The chat app fetches the image as an anonymous visitor. If the address needs a session, the card has no image, and often no card at all.

A relative image address. og:image has to be a full https:// address; /img/preview.png is not fetched.

A stale card. Most apps cache the first card they drew for an address. Changing the title later does not change the card in old messages, and some apps keep the old card for new pastes for a day or more. Get the title right before the first share.

The tags and the search snippet

Open Graph tags and the meta description do different jobs. Search engines read the title tag and the meta description for the result snippet; chat apps read og:title and og:description for the card. They can carry the same words, and usually should, but a page needs both sets, because neither reader looks at the other's tags.

Getting the preview card right: 4 steps

  1. Write the <title> first, then og:title to match. The title is what the tab shows; og:title is what the card shows. Usually the same words, with the date in them for anything periodic.
  2. Add og:description and og:image. One sentence, and an image at a full https:// address, at least 1200 by 630 pixels, that reads at thumbnail size.
  3. Add og:type and the twitter card line. article or website, and twitter:card set to summary_large_image so the image shows large.
  4. Paste the link into a chat with yourself and look at the card. If it is a bare address, one of the three is missing or the image is not reachable without a login. A NOS page carries its title and description into the card automatically: Share, then Share link, then Create link.

Questions people ask

What are Open Graph tags?

Meta tags in the head that tell chat and social apps what title, description and image to show when your link is shared.

What image size should I use?

1200 by 630 pixels. Under about 200 by 200 many apps show no image at all, and a very large file may be skipped for timing out.

Why does my preview show the old title?

Previews are cached by the app that fetched them. Most platforms have a debug tool that forces a refetch.

Do I need Twitter card tags separately?

One line — twitter:card set to summary_large_image. The rest is read from the Open Graph tags.

Keep reading