Open Graph Tags: How to Control Your Link Previews

When someone shares your page on Facebook, LinkedIn or Slack, a preview card appears with a title, description and image. Open Graph tags are what control that card. Leave them out and the platform guesses, often badly, pulling the wrong image or a truncated title. Get them right and every share looks deliberate and clickable. This guide covers the essential tags, image sizes, and how to test your previews.

What Open Graph is

Open Graph (OG) is a protocol, originally from Facebook, that lets you define how a page looks when shared on social platforms. It works through meta tags in the page <head> that specify the title, description, image and other details of the preview. Because most major platforms read Open Graph, setting these tags once controls how your link appears almost everywhere it gets shared. Without them, platforms scrape the page and make their best guess, which is a gamble you do not need to take.

The essential Open Graph tags

Four tags do most of the work:

Tag Controls
og:title The headline on the preview card
og:description The short text under the title
og:image The preview image, the most important tag visually
og:url The canonical URL of the page

Two more are worth adding: og:type (usually website or article) and og:site_name (your brand). The image is where most of the impact lives, a strong image is the difference between a share people notice and one they scroll past.

Open Graph image size

Getting the image dimensions right prevents awkward cropping. The recommended size is 1200 x 630 pixels (a 1.91:1 ratio), which displays cleanly across platforms. Keep the file under about 1 MB so it loads fast, use JPG or PNG, and keep important content, text or faces, away from the edges in case of minor cropping. An image that is too small or the wrong ratio gets stretched, letterboxed or cropped unpredictably.

Open Graph versus Twitter Cards

X (Twitter) has its own tag set called Twitter Cards, but it falls back to Open Graph tags when its own are missing. In practice you can set the core Open Graph tags and add a couple of Twitter-specific ones (twitter:card, twitter:image) to fine-tune the X appearance. If you only set Open Graph, X will still show a reasonable card using your OG data. For full control on X, our Twitter Card validator helps you build and preview the Twitter-specific tags.

Why previews sometimes look wrong

A common frustration: you update the tags, re-share the link, and the old preview still appears. Platforms cache Open Graph data, so they keep showing the version they scraped earlier. The fix is to clear the cache using the platform’s debugging tool (Facebook’s Sharing Debugger, LinkedIn’s Post Inspector), which forces a fresh scrape. If a preview looks wrong, the tags are usually fine, the cache is just stale.

Extra tags for articles

For blog posts and news, a few article-specific Open Graph tags add polish and context. Setting og:type to article unlocks properties like article:published_time, article:modified_time and article:author, which some platforms display and which reinforce freshness and authorship. These will not transform your previews, but they are cheap to add and make your shared articles feel more complete. Most SEO plugins set the core Open Graph tags automatically from your post data; the value of understanding them is knowing what to check when a preview looks wrong, and being able to override the image or description when the auto-generated pick is not your best one.

Test before you share widely

Always preview how a link will look before promoting it. Our free Open Graph preview tool lets you build and see the preview card as it will appear when shared, so you can check the title, description and image are exactly what you want, and copy the tags to paste into your page. Catching a wrong image before a launch beats fixing it after the link has already been shared a hundred times.

The takeaway

Open Graph tags control how your pages look when shared on social platforms, and setting the core four, title, description, image and URL, plus a properly sized 1200 x 630 image, makes every share look intentional and clickable. Remember platforms cache previews, so refresh the cache after changes. Build and preview yours with the Open Graph preview tool, and explore the rest of our free SEO tools.

Questions? Chat with us