Skip to content
Back to the guides
Guide Last checked: October 2026 7 min read

Social cards: Open Graph tags and the share image

When a link is shared, a small card appears with image, title and text. This guide explains the Open Graph tags behind it, the share image, title and description, the tag for X and why platforms sometimes keep showing an old preview.

What a link preview is

When someone shares a link in a social network or a messenger, the platform reads the page and builds a small card: an image, a title, a short text and the domain. Most platforms read the tags of the Open Graph protocol for this, which are meta elements in the head of the page. X, formerly Twitter, also reads its own tags that begin with twitter:. Each platform designs its card itself and decides how much text it shows. You decide what the page tells the platforms.

Left, a web page whose head contains several tag lines. An arrow leads to a chat window on the right. In the chat, a preview card shows a wide image with mountains and a sun, a title in two lines, a short text and the domain.
The tags in the head of a page become the preview card in a chat or a social network.

The basic tags

The Open Graph protocol, published at ogp.me, names four properties that every page should have: og:title, og:type, og:image and og:url. og:url is the canonical address of the page. Optional, but useful, are og:description, og:site_name and og:locale, the language and region of the tags, for example de_DE.

<meta property="og:title" content="Summer sale: all mugs reduced">
<meta property="og:type" content="article">
<meta property="og:url" content="https://example.com/blog/summer-sale">
<meta property="og:image" content="https://example.com/img/summer-sale-1200x630.jpg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="Six blue mugs on a wooden table">
<meta property="og:description" content="Until 31 August: lower prices on mugs and plates.">
<meta property="og:site_name" content="Example Shop">
<meta name="twitter:card" content="summary_large_image">

Write every address in full, with https://. The protocol defines an address as a URL that uses http:// or https://, so a path such as /img/sale.jpg is not a valid value. og:url should match the canonical link of the page. If a tag appears twice with different values, the protocol gives preference to the first one.

The share image

Most previews show the image wide. An image in a ratio of about 1.91 : 1, for example 1200 × 630 pixels, is commonly recommended and fits most cards without cropping. Square images are often cropped at the top and bottom, so keep important content in the middle. For Google Discover, Google recommends images that are at least 1200 pixels wide, a large preview allowed with the setting max-image-preview:large, and an image set with og:image or schema.org markup. Google also advises against generic images such as the site logo.

og:image:width and og:image:height state the size of the image in pixels. og:image:alt describes what is in the image, not a caption. The protocol says that a page with og:image should also specify og:image:alt.

Share image: works well and causes problems
Works well
  • Wide format, about 1.91 : 1, for example 1200 × 630 px
  • Important content in the middle
  • A full address with https://
  • JPEG, PNG or WebP
  • An image that represents the page
Causes problems
  • Square or tall images that wide previews crop
  • Text or faces close to the edges
  • A path such as /img/sale.jpg
  • SVG, which many platforms do not show
  • Only the site logo

Title and description

og:title can differ from the title element. It does not need the name of the website, because og:site_name carries it. Platforms cut long texts at their own length, so put the important words first. Open Graph tags also matter beyond social networks. Google names the content of og:title as one of the sources for title links in search results, considers og:site_name for the site name, and lists og:image as one way to specify a preferred image.

Tags for X

The tag twitter:card chooses the type of card. The value summary_large_image asks for a large, wide image, summary for a small one. If your page already has Open Graph tags, adding twitter:card is often enough. The developer pages of X could not be read for this guide, so check the current rules there before you rely on a detail.

One card per page

Many websites set the same title and image for every page, often through the theme. Then every shared link looks the same. Give each important page its own og:title, og:description and og:image: a product page the product photo, an article its main image. For og:type, the protocol uses website for a general page and article for an article, among other types. A shop or content system can fill these tags automatically from the title, the summary and the main image of each page. After a change, check one page of each template.

Why the preview does not change

What happens when a link is shared
Link pasted
In a post, a chat or a message.
Page fetched
The platform reads the HTML, mainly the head.
Tags read
Open Graph and twitter tags; without them, often the title and other text of the page.
Image fetched
From the address in og:image.
Card built and stored
Later shares often show the stored card.
A simplified model. Each platform has its own reader and its own rules.

Many platforms store a card once they have built it. If you change the image or the title later, people may still see the old card for a while. A new file name for a new image helps, because the platform then sees a new address. Some platforms offer a tool that fetches the page again.

The shared link shows an old or no image
Are the tags on the page correct, with a full address that loads the image?
Yes
The platform probably shows a stored card. Give the new image a new file name, and use the tool of the platform to fetch the page again, if it offers one.
No
Fix the tags first: a full https address, an image that can be loaded, and og:image in the head of the page.

Before you share a page

  • Are og:title, og:type, og:image and og:url present, and is og:url the canonical address?
  • Is every address complete, with https://?
  • Is the image wide enough, does it load, and is the important content in the middle?
  • Are og:image:alt, og:image:width and og:image:height set?
  • Is there a twitter:card tag, and is the title short enough?

Work with Do4U

The Social card check shows how a page looks when its link is shared, and checks the tags behind the preview. You enter one address. Do4U reads the page and the start of its share image. The code collects the Open Graph tags, the Twitter/X card tags and the fallbacks, that is the title, the meta description and the first image, as well as the canonical link and the language. It reads the real format and size of the image from the file and compares them with the tags. You get a neutral preview, a table of all tags, findings with a short reason and suggested tags to copy. Tags that a page sets only with JavaScript are not seen. No AI is used, and the check is free, with a daily limit.

Do4U finds hints, you check and decide. The preview is a neutral sketch: how a platform shows the link is decided by the platform.

Sources