The Complete Guide to OpenGraph Protocol & Twitter Cards
An architectural breakdown of OpenGraph (og:*) metadata protocols, Facebook crawler scraping rules, Twitter Card schemas, and 1200ร630 pixel canvas specifications.
Core OpenGraph Meta Tags Explained
og:title: The bold headline shown on social feeds. Recommended length: 55โ65 characters to prevent truncating on mobile devices.og:description: A 2-sentence summary hook (130โ160 characters). Do not repeat the title; provide context that encourages clicks.og:image: The URL of the image displayed in the card. The golden ratio is 1200 × 630 pixels (1.91:1 aspect ratio) with file size under 5 MB.og:url: The canonical URL of the page. Crucial for consolidating social engagement signals and preventing duplicate content splits.og:type: Specifies the content category (websitefor homepages,articlefor blog posts,productfor e-commerce).
WhatsApp Link Preview Caching Caveats
WhatsApp generates preview thumbnails directly on the sender's device. To ensure your image renders cleanly on WhatsApp:
- Keep the image file size strictly below 300 KB (WhatsApp will silently reject larger preview images).
- Always use an absolute HTTPS URL (e.g.
https://yourdomain.com/og-image.jpg). - Ensure the server returns standard image headers (
Content-Type: image/jpegorimage/png).
Frequently Asked Questions
Standard HTML tags (<title> and <meta name="description">) are primarily consumed by search engine crawlers like Google and Bing. OpenGraph tags (prefixed with og:) were designed by Facebook and adopted globally by Twitter/X, LinkedIn, WhatsApp, Discord, and Slack to render rich visual link cards.
The industry gold standard is 1200 × 630 pixels (1.91:1 ratio). At this resolution, your card displays crisply as a full-width hero banner on high-DPI retina screens. The minimum allowable dimensions for a large card are 600 × 315 pixels.
Social media networks aggressively cache OpenGraph data for up to 30 days. To force Facebook to re-scrape your page, use the free Facebook Sharing Debugger and click "Scrape Again". For Twitter, share the URL in a test tweet to refresh the card cache.
Copy all generated tags and paste them inside the <head>...</head> section of your HTML document, immediately before your stylesheet links.