What is an Open Graph preview?
An Open Graph preview is a mock version of the card social apps build from a web page. Those apps read a few meta tags in the page's HTML. Seeing the card first lets you fix a bad crop before anyone else sees it.
Which Open Graph tags do you need?
<meta property="og:title" content="Spring sale starts Friday" />
<meta property="og:type" content="website" />
<meta property="og:image" content="https://www.example.com/sale.png" />
<meta property="og:url" content="https://www.example.com/sale" />
<meta property="og:description" content="Up to 40% off until Sunday." />
The protocol requires title, type, image and url. Add the description as well, because several apps show it. Use complete https addresses for the image and the page.
What is the best OG image size?
Use 1200 x 630 pixels. It suits Facebook, LinkedIn and large cards on X. LinkedIn asks for at least 1200 x 627 and a file under 5 MB. Keep logos and words near the middle, since apps trim the edges differently.
| Problem | Likely cause | Fix |
|---|---|---|
| No image | Relative or private image URL | Use a public https address |
| Cropped image | Wrong ratio | Export at 1200 x 630 |
| Old image | The app cached it | Refresh with that app's own debugger |
| Wrong title | Two og:title tags | Remove the duplicate |
Why does an app show the old preview?
Most apps save a copy of the card. Changing the tag doesn't clear it. Facebook has the Sharing Debugger and LinkedIn has Post Inspector, and both can fetch the page again. Read our guide if your LinkedIn link preview isn't working.
Can you preview a page on localhost?
Yes, by typing the tags in manually. No outside service can fetch your own machine. Need a lighter image first? Run it through the image optimizer. Add page facts for search engines with the schema markup generator.