
Key points
- Open Graph tags (
og:title,og:description,og:image,og:url) control link previews on Facebook, LinkedIn, messaging apps and more. X adds its owntwitter:cardtag. - Use an absolute https image URL, around 1200 × 630 px, with a modest file size.
- Platforms cache previews. After changing tags, use the platform's debugger to refresh them.
What Open Graph is
Open Graph is a set of <meta> tags first created by Facebook that describe a page for sharing. Today many services read them: social networks, chat apps, collaboration tools and email clients. Without them, a platform guesses from your title, description and the first image it finds, which often goes wrong.
Open Graph tags are not a ranking factor in search. They affect how your page looks when it is shared, and so how many people click.
The tags to set
<meta property="og:title" content="Waxed Canvas Backpack, 24 L">
<meta property="og:description" content="Water-resistant, with a padded laptop sleeve.">
<meta property="og:image" content="https://example.com/img/backpack-1200x630.jpg">
<meta property="og:image:alt" content="A green canvas backpack on a wooden bench">
<meta property="og:url" content="https://example.com/backpack/">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Example Store">
<meta name="twitter:card" content="summary_large_image">
og:titleandog:descriptioncan differ from your search title and description. Write them for people scrolling a feed.og:urlshould be the canonical address. See canonical URLs.og:typeiswebsitefor most pages andarticlefor blog posts.twitter:cardset tosummary_large_imageasks X for the large image layout. X falls back to Open Graph for the title, description and image when its own tags are missing.
Getting the image right
- Size: 1200 × 630 pixels (about 1.91:1) is a safe choice that fits Facebook, LinkedIn and most chat apps. Keep important content away from the edges, because some platforms crop.
- File size: keep it small, ideally a few hundred kilobytes. Platforms limit file size and slow images may not load in the preview. JPEG or PNG are the safest formats.
- Address: use a full
https://URL that loads without logging in. A relative path or a blocked image folder produces no image. - Readable text: if the image carries text, make it large. Previews can be shown very small on phones.
- Alt text: add
og:image:altso the image is described where supported.
Why changes do not show up
Platforms fetch your page once and keep the preview for a while. If you fix a tag and the old card still appears:
- Confirm the new tags are in the HTML the server sends. Social crawlers generally do not run JavaScript, so tags added by scripts are invisible to them.
- Re-scrape the address with the platform's tool, such as the Facebook Sharing Debugger or the LinkedIn Post Inspector.
- For chat apps with no debugger, adding a harmless query string such as
?v=2to the shared link usually forces a fresh fetch.
Robots rules apply to social crawlers too. If robots.txt or a firewall blocks them, previews will be empty even when the tags are perfect.
How to test
- Paste your address into the meta tags checker. It lists your Open Graph and Twitter tags, checks that the image loads and reports its dimensions and size.
- Fix anything missing: title, description, image or url first.
- Share the link privately with yourself in a chat app or social post draft to see the real card.
The search title and description still matter separately. Many sites set both and keep them aligned.
FAQ
Do Open Graph tags help SEO?
Not directly. They do not influence rankings, but a good preview can raise clicks from shares, and shares can bring visitors and links.
What size should an Open Graph image be?
1200 × 630 pixels is a safe and widely used size. Keep the file small and the key content in the centre.
Do I need separate Twitter tags?
Mostly one: twitter:card, to choose the large image layout. X reads Open Graph tags for the rest when its own are absent.
Why does my shared link show an old image?
The platform cached the earlier version. Use its debugger tool to fetch the page again, and check that the tags are in the server-sent HTML.
Can I set different previews for different pages?
Yes, and you should. Each page needs its own title, description, image and url, so that shared pages are told apart.