What is Open Graph?
Open Graph (OG) is a protocol created by Facebook that controls how web pages appear when shared on social media. When you share a URL on Facebook, LinkedIn, Slack, or WhatsApp, the platform reads OG tags to display a preview card.
Why your social shares might look wrong
If you've ever shared a link and seen the wrong image, a missing image, or incorrect text, it's because:
- Missing
og:imagetag - Image wrong dimensions (not 1200×630px)
- Title or description too long
- HTTPS vs HTTP mismatch on image URL
- Cached old data from previous version
OG image specifications by platform
| Platform | Recommended size | Aspect ratio | Max file size |
|---|---|---|---|
| 1200 × 630px | 1.91:1 | 8MB | |
| Twitter/X | 1200 × 675px | 16:9 | 5MB |
| 1200 × 627px | 1.91:1 | 5MB | |
| 400 × 400px | 1:1 | 300KB |
Use 1200×630px as your default — it works well everywhere.
How to test your OG tags for free
- Go to OG Image Preview
- Enter your page URL or paste the HTML source
- View previews for Facebook, Twitter, and LinkedIn simultaneously
- Check the issues checklist for missing or problematic tags
- Fix issues and test again
Common OG issues and fixes
Missing og:image
Add to your HTML head:
<meta property="og:image" content="https://yoursite.com/og-image.jpg">
Image not showing (HTTPS required)
Make sure your og:image URL starts with https://, not http://
Wrong image appearing
Social platforms cache OG data. Force refresh using:
- Facebook: developers.facebook.com/tools/debug
- Twitter: cards-dev.twitter.com/validator
- LinkedIn: linkedin.com/post-inspector