June 20, 2025·5 min read

Open Graph Tags Explained: How to Control Your Social Media Previews

Without Open Graph tags, social platforms guess which image, title, and description to show when your page is shared — usually poorly. This guide covers the essential tags, image specs, and common mistakes.

Open Graph (OG) tags are HTML meta attributes that control how your web pages appear when shared on Facebook, LinkedIn, Slack, WhatsApp, and other platforms that render link previews. Without them, platforms make their own choices about which image, title, and description to display — often with poor results that reduce click-through rates from social sharing.

This guide covers the essential OG tags, the image specifications that matter most, common implementation mistakes, and how to check your social snippets before you publish.

What are Open Graph tags?

Open Graph is a protocol developed by Facebook that standardizes how web page metadata is read and displayed by third-party platforms. It uses <meta> tags in the <head> section of your HTML with a property attribute prefixed by og:.

When someone shares your URL, the receiving platform crawls the page, reads the OG tags, and renders a preview card using those values. If the tags are missing or misconfigured, the platform falls back to guessing — often picking an irrelevant image, a truncated heading, or no description at all.

The four essential Open Graph tags

Every published page should include these four tags:

  • og:title — The title as it should appear in the preview card. This does not have to match your HTML <title> tag exactly. For social sharing, you can write a slightly more conversational version of the title — one that performs better without a keyword focus.
  • og:description — A 1–2 sentence summary of the page. Aim for 100–150 characters so it displays fully on most platforms without truncation.
  • og:image — The URL of the image to show in the preview card. This is the highest-impact OG tag: a compelling, correctly sized image dramatically increases click-through rate from social shares.
  • og:url — The canonical URL of the page. This ensures that all shares of a page point to the same URL for analytics tracking, even when the page is accessed through query strings or redirects.

A fifth tag, og:type, specifies the content type. For standard pages and blog posts, set it to website. For articles, use article, which unlocks additional properties like article:published_time that social platforms display in previews.

Open Graph image specifications

The OG image has stricter requirements than any other tag. Getting it wrong is the most common reason preview cards look broken or low-quality on social media:

  • Minimum size: 1200 × 630 pixels. This is the dimension used by Facebook and LinkedIn for large preview cards. Images smaller than this are displayed as small thumbnails on many platforms.
  • Aspect ratio: 1.91:1 (roughly 2:1). An image that does not match this ratio will be cropped by the platform, often cutting off key content in unexpected places.
  • File size: Under 8 MB hard limit on most platforms, but aim for under 1 MB for performance.
  • Format: JPEG or PNG. WebP is not universally supported by OG crawlers.
  • Absolute URL: The og:image value must be a full URL including protocol and domain (e.g., https://example.com/images/preview.jpg), not a relative path. Relative paths fail on every platform.

Twitter Cards

Twitter (now X) uses its own meta tags called Twitter Cards. Most platforms fall back to OG tags if Twitter Card tags are absent, but Twitter itself gives priority to its own tags. The key Twitter Card tags to add alongside your OG tags:

  • twitter:card — Set to summary_large_image to display a large preview image below the tweet.
  • twitter:title — Mirrors og:title in most cases.
  • twitter:description — Mirrors og:description.
  • twitter:image — Mirrors og:image. The same 1200 × 630 image works perfectly for both.

In Next.js, both OG and Twitter Card tags are managed through the metadata export in any page file, which renders the correct HTML attributes automatically without manual meta tag management.

Common Open Graph mistakes

  • Missing og:image: The most impactful mistake. A link preview without an image gets dramatically less engagement than one with a strong visual. Every published page should have an OG image set.
  • Using a relative image URL: /images/og.jpg will not work. OG crawlers require the full https:// URL to fetch the image.
  • The same OG image on every page: A generic site logo on every page reduces relevance. Unique images per page — or at minimum per content type — perform better in social feeds.
  • og:description too long: Facebook truncates descriptions at around 300 characters and LinkedIn at around 200. Write concisely.
  • Stale cache: After updating OG tags, social platforms continue serving the cached version. Use Facebook’s Sharing Debugger or LinkedIn’s Post Inspector to force a cache refresh after deploying changes.

How to preview your Open Graph tags before publishing

The SlugGenius SERP Snippet Preview lets you verify how your title and description render before you publish — measuring them in pixels exactly as Google does, so you can catch truncation issues in real time. For social platform previews specifically, use each platform’s native tools after the page is live: Facebook’s Sharing Debugger, LinkedIn’s Post Inspector, and Twitter’s Card Validator all show exactly how the preview card will render.

Taking ten minutes to verify your OG tags before publishing meaningfully increases the click-through rate of every social share your page receives — a compounding return as the content is shared and reshared across platforms over time.