SEO & Growth EngineeringUpdated: 2026-11-04

Social Media Meta Tags & Open Graph Protocol (OGP) Cheat Sheet

The complete specification for Facebook Open Graph, Twitter/X Cards, LinkedIn previews, and Schema.org snippets.

The Open Graph protocol enables any web page to become a rich object in a social graph. When a URL is shared on Twitter/X, LinkedIn, Facebook, Slack, or WhatsApp, social crawlers inspect your `<head>` meta tags to generate rich preview cards with images, titles, and descriptions.

Core Open Graph Protocol Tags (Facebook, LinkedIn, Slack)

Mandatory standard tags for all public web pages.

Standard Open Graph Head Tagshtml
<meta property="og:type" content="website" />
<meta property="og:url" content="https://docswift.xyz/tools/compress-pdf" />
<meta property="og:title" content="Compress PDF Online to Specific Size - 100% Free & Private" />
<meta property="og:description" content="Compress PDF files client-side directly in your browser. Zero server uploads." />
<meta property="og:image" content="https://docswift.xyz/og-images/compress-pdf.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="DocSwift PDF Compression Tool" />
<meta property="og:site_name" content="DocSwift" />
<meta property="og:locale" content="en_US" />
Copy and paste into your HTML `<head>` or Next.js metadata export.

Twitter / X Card Tags

Specific proprietary tags used by Twitter/X to render small or large summary cards.

Summary Card with Large Image (Recommended)html
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@DocSwiftApp" />
<meta name="twitter:creator" content="@DocSwiftApp" />
<meta name="twitter:title" content="DocSwift - Client-Side File Tools" />
<meta name="twitter:description" content="Process PDFs, images, and audio directly in your browser with zero server uploads." />
<meta name="twitter:image" content="https://docswift.xyz/og-images/twitter-card.png" />
Renders full-bleed visual cards on Twitter/X feeds for maximum click-through rates.

Recommended Dimensions & Limits

Optimal visual assets and character counts to prevent clipping on mobile devices.

Asset / PropertyRecommended Size / LimitImpact if Exceeded
OG Image Dimensions1200 × 630 pixels (1.91:1 ratio)Lower resolutions look blurry on retina screens; irregular aspect ratios get cropped.
OG Image File SizeUnder 5MB (Prefer WebP or PNG < 300KB)Crawlers timeout and discard card image.
Title Length55 - 60 charactersTruncated with ellipsis (`...`) on mobile devices.
Description Length110 - 150 charactersTruncated after second line on LinkedIn and WhatsApp previews.

Frequently Asked Questions

Why does my updated og:image not show up when shared on LinkedIn or Twitter?

Social platforms aggressively cache Open Graph meta tags for up to 7 days. You must force their crawlers to refresh by submitting your URL to the LinkedIn Post Inspector or using DocSwift's Open Graph Previewer.

Can I use relative URLs for og:image?

No. The Open Graph protocol strictly requires absolute URLs starting with `https://`. Relative paths like `/images/og.png` will fail to resolve on third-party scrapers.