When someone shares your page on Facebook, LinkedIn, Slack or Discord, the preview is built almost entirely from Open Graph tags. If they are missing, the platform scrapes whatever it can find and often produces a broken card with the wrong image, a truncated headline, or no image at all. This guide lists the tags you need, the exact image sizes, and the mistakes that make links look abandoned.
What Open Graph is
Open Graph is a protocol originally created by Facebook that defines six core properties for any shared object: an object type, URL, title, description, image, and site name. Any platform can read it, which is why the same tags fix previews in messaging apps and embeds as well. It sits alongside — not instead of — your standard meta description, and the two can differ: your search snippet is written for a results page, your og description for a timeline.
The five tags every page needs
| Tag | Recommended length | What it controls |
|---|---|---|
| og:title | 60 characters | Bold headline on the card |
| og:description | 160 characters | Supporting line under the headline |
| og:url | Full canonical URL | Where the card links when clicked |
| og:image | 1200 × 630 pixels | The visual; the single biggest factor in engagement |
| og:type | website or article | Which optional properties apply |
Add og:site_name as a sixth tag so your brand appears above the headline, and include an og:image:alt string describing the image — accessibility matters and platforms use it when the file fails to load.
Image specs that actually render
The safe zone is 1200 × 630 pixels in PNG or JPEG, under 5 MB. That ratio appears as a wide rectangle on desktop feeds, a taller crop on mobile, and a small square thumbnail in chat apps. Design with the centre of the frame as your focal point, keep text above 30 pixels tall, and avoid logos crammed into corners — they vanish in the smallest crop. An image below 200 pixels wide will be rejected outright by some platforms and the card falls back to a text-only layout.
Small extras that improve the card
- og:video — turns the card into a playable preview on supported platforms.
- article:published_time — shows a date on news-style shares.
- twitter:card — a summary_large_image tag ensures X uses your image instead of a tiny thumbnail.
- theme-color — colours the browser chrome when the page is opened from a share.
The mistakes that produce ugly previews
Relative image paths are the most common failure: a value of /images/hero.png works on your server but cannot be resolved by the crawler, so no image loads. Second is reusing the same og:url across paginated pages, which makes every shared article link to page one. Third is an og:image with a different aspect ratio than expected — platforms crop it from the bottom and your call-to-action disappears. Finally, forgetting og:description entirely causes the platform to grab your first paragraph, which is often a navigation breadcrumb or a table of contents line.
Build and check your tags
- Generate the full head block from your page's title, description and image URL.
- Confirm the image is exactly 1200 × 630 and hosted at an absolute https URL.
- Paste the live URL into the Open Graph Preview and inspect desktop and mobile crops.
- Validate the remaining head markup with the Meta Tag Generator.
- If the page also carries structured data, run it through the Schema JSON-LD Generator so both blocks stay consistent.
Frequently asked questions
Do Open Graph tags affect SEO? They do not influence rankings directly, but shared links with good images earn more clicks and backlinks, and preview quality affects how many people reach the page in the first place.
What if Facebook shows an old image? Platforms cache scraped cards for hours. Re-scrape with the sharing debugger after deploying changes, and give the image a new filename to force a fresh fetch.
Are Twitter cards still necessary? Yes. X reads Open Graph as a fallback, but explicit twitter:card and twitter:image tags guarantee the large-image layout instead of a generic thumbnail.