Social platforms may use Open Graph and Twitter Card metadata to build link previews. They can also use other page content, cache older values or omit a preview. Accurate metadata influences presentation but does not control it or guarantee clicks.
What Is Open Graph?
Open Graph describes a page as an object using metadata such as title, type, image and URL. Platforms may interpret these tags for previews, but their rendering, fallback and cache behavior differ.
Without OG tags, platforms attempt to scrape your page title, find a suitable image, and extract a description — a process that frequently produces awkward or broken previews. With OG tags, you get full control over the social presentation of every page on your site.
Essential Open Graph Tags
The Open Graph protocol’s four basic properties are og:title, og:type, og:image and og:url. Description and site_name are useful optional properties; platform requirements and presentation can differ.
- og:title: An accurate title for the preview. It may differ from the page title; a fixed character count cannot prevent truncation on every platform.
- og:description — A 1–2 sentence summary shown below the title. Aim for 100–150 characters. Write it for social audiences, not search engines.
- og:image — The URL of the preview image. This is the most visually prominent element of any social card. Use absolute URLs only.
og:urlidentifies the canonical object URL for Open Graph. Use a stable appropriate URL; platform treatment of engagement and URL variants varies, so consolidation is not guaranteed everywhere.- og:type: Use a supported object type appropriate to the content, such as article or website. Do not assume a platform-specific product extension is universally understood.
- og:site_name — Your website's brand name. Displayed as secondary text on some platforms, helping users identify the source.
Twitter Card Tags
X uses twitter:-prefixed card metadata and can fall back to some Open Graph properties. Supplying accurate tags does not guarantee the card type, displayed fields or immediate updates.
- twitter:card — Defines the card type. Use
summary_large_imagefor articles with hero images (large horizontal image above text) orsummaryfor a compact card with a small square thumbnail. twitter:titlesupplies a card title. Follow the current platform’s field limits; actual displayed text can be truncated depending on layout and device.twitter:descriptionsupplies a summary. Keep it accurate and concise; 125 characters is not a universal display maximum.- twitter:image — The image URL for the card. Must be at least 300×157 pixels for
summary_large_image. - twitter:site identifies a relevant X account where supported. Use only a verified account you are authorized to represent; a sample handle is not evidence of ownership or credibility.
Image Dimensions by Platform
Each platform has preferred image dimensions. Using the wrong size results in cropping, letterboxing, or blurriness.
| Platform | Recommended Size | Aspect Ratio | Min Size | Max File Size |
|---|---|---|---|---|
| 1200 × 630 px | 1.91:1 | 200 × 200 px | 8 MB | |
| Twitter/X | 1200 × 600 px | 2:1 | 300 × 157 px | 5 MB |
| 1200 × 627 px | 1.91:1 | 200 × 200 px | 5 MB | |
| Discord | 1200 × 630 px | 1.91:1 | Any | 8 MB |
| 1200 × 630 px | 1.91:1 | 300 × 200 px | 5 MB |
A single 1200×630 image works well across all platforms. If you can only create one size, use that.
Platform-Specific Behavior
Facebook may cache preview data. The Sharing Debugger can request a new scrape and report fetching or image issues, but it does not guarantee immediate updates to every existing share. Check current platform requirements and the actual fetched image.
X can use Twitter Card tags and supported Open Graph fallbacks. Card display is subject to its current rules, fetchability and caching; a validator visit is not a universal new-domain activation requirement. Keep key image content clear of edges.
LinkedIn uses page metadata for previews. Use its Post Inspector to inspect a URL and request refreshed information where supported. Cache refresh time and displayed description length are not guaranteed.
Discord may use Open Graph metadata for embeds. Displayed fields, color, animation and image support depend on the client and current platform behavior; test representative links rather than assuming every GIF or tag is supported.
WhatsApp link previews can use Open Graph metadata, with fetch and cache behavior varying by client and platform. Do not assume every device independently fetches the page or that a metadata update immediately refreshes every shared message.
Debugging Tools
Inspect tags and test representative real shares. Tools help diagnose fetched metadata, but cannot show every recipient’s exact rendering:
- Facebook Sharing Debugger reports parsed preview metadata and warnings. Scrape Again requests a new fetch; it is not a promise to clear every cache or update every share.
- X card tools: Check the current X documentation for supported validation and debugging workflows; tool availability and preview features can change.
- LinkedIn Post Inspector can inspect a URL and request refreshed preview information. Treat the result as a diagnostic preview rather than a guarantee for every client or existing share.
- OpenGraph.xyz — A third-party tool that previews your OG tags across multiple platforms simultaneously, saving time when checking all platforms at once.
Common Mistakes
- Missing og:image entirely. Sharing a link without an image dramatically reduces engagement. Social posts with images typically draw far more clicks than text-only previews.
- Wrong image dimensions. Images smaller than the minimum size get ignored or displayed as tiny thumbnails. Images with the wrong aspect ratio get cropped unpredictably, cutting off text or important visuals.
- Using relative URLs for og:image. OG image URLs must be absolute (starting with
https://). Relative paths like/images/og.jpgwill not be resolved by social platform crawlers. - Stale previews: After metadata changes, use available platform inspection or re-scraping tools and allow for cache delays. Refresh timing and updates to existing shares are not guaranteed.
- Identical OG and page titles. Your og:title doesn't need SEO keywords; it should be optimized for social engagement. A clickable, curiosity-driven social title often outperforms a keyword-heavy SEO title.
- Forgetting og:url. Without a canonical OG URL, shares of the same page with different query parameters (UTM codes, session IDs) are treated as separate items, fragmenting your engagement data.
Try It Yourself
Preview approximate social-card layouts before sharing. These simulations do not guarantee platform rendering.
OG Preview →