← Blog · By Mars LLC editorial team · October 4, 2026 · Editorial standards

Open Graph tags: make your links look good everywhere

The Open Graph tags that control social previews, the image size that works, and the mistakes to avoid.

When someone shares your link on social, LinkedIn, Slack or WhatsApp, the preview is controlled by Open Graph tags. Without them, platforms guess — often badly.

The core four

<meta property="og:title" content="Your title" />
<meta property="og:description" content="A short description" />
<meta property="og:image" content="https://example.com/image.jpg" />
<meta property="og:url" content="https://example.com/page" />

The image is everything

Use a 1200×630px image with a safe margin, because platforms crop differently. Keep the subject centred and avoid text near the edges.

  • Provide absolute URLs
  • Use a 16:9-ish image; 1200×630 is the safe default
  • Keep the file under ~1MB for fast loading
  • Avoid transparent PNGs (some platforms render a black background)

Twitter/X cards

X falls back to Open Graph, but explicit twitter:card tags give more control:

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Your title" />
<meta name="twitter:description" content="A short description" />
<meta name="twitter:image" content="https://example.com/image.jpg" />

Common mistakes

  • Missing og:image, so the preview is blank
  • Relative image URLs (must be absolute)
  • One generic image reused everywhere
  • Description longer than about 200 characters
  • og:url pointing at a staging host

How to test the preview

  • Facebook Sharing Debugger — scrapes the URL and shows the cached preview; use "Scrape Again" after changes
  • LinkedIn Post Inspector — same idea
  • X Card Validator — check the card type and image
  • Our Open Graph generator also shows a quick preview

Caching is the usual culprit: platforms cache previews, so re-scrape after you update tags.

OG vs Twitter vs schema

They serve different platforms but should agree. If og:title says one thing and the <title> says another, that is usually a bug. Keep the canonical title consistent and let each set of tags extend it.

Worked example

A blog post about "robots.txt" uses:

<meta property="og:type" content="article" />
<meta property="og:title" content="What is robots.txt (and how to write one)" />
<meta property="og:description" content="What robots.txt does, the syntax, and the mistakes that break crawling." />
<meta property="og:image" content="https://example.com/og/robots-txt.png" />
<meta property="og:url" content="https://example.com/blog/what-is-robots-txt" />

The image is a branded 1200×630 card with the post title, generated once per post.

Generate and preview

Use the free Open Graph generator to produce the tags and check your share preview, and see the blog version for content sites.

Try the free tool

Generate Open Graph and Twitter Card meta tags so your link previews look right on social media.

Open Open Graph Generator