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.
Table of Contents
Core Open Graph Protocol Tags (Facebook, LinkedIn, Slack)
Mandatory standard tags for all public web pages.
<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" />Twitter / X Card Tags
Specific proprietary tags used by Twitter/X to render small or large summary cards.
<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" />Recommended Dimensions & Limits
Optimal visual assets and character counts to prevent clipping on mobile devices.
| Asset / Property | Recommended Size / Limit | Impact if Exceeded |
|---|---|---|
| OG Image Dimensions | 1200 × 630 pixels (1.91:1 ratio) | Lower resolutions look blurry on retina screens; irregular aspect ratios get cropped. |
| OG Image File Size | Under 5MB (Prefer WebP or PNG < 300KB) | Crawlers timeout and discard card image. |
| Title Length | 55 - 60 characters | Truncated with ellipsis (`...`) on mobile devices. |
| Description Length | 110 - 150 characters | Truncated after second line on LinkedIn and WhatsApp previews. |
Interactive Client-Side Tools for this Guide
Test and run these patterns directly inside your browser with zero server uploads:
Open Graph & Social Media Card Previewer
Preview your webpage metadata across Google search results, Twitter large image cards, and Facebook feeds before publishing.
YouTube Thumbnail Downloader (HD & 4K)
Paste any YouTube video or Shorts link to instantly preview and download the creator's original full-resolution cover image.
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.