Guide

Open Graph tags: make your links look right on social media

Why a shared link sometimes shows the wrong picture or none at all, and the few tags that fix it.

When you share a link on Facebook, Facebook visits the page and builds a preview card: a picture, a title and a short description. It takes them from a few tags in the page's HTML <head>, called Open Graph tags. When they are missing, it guesses, and it often picks a logo, an advert or nothing. Threads and other apps read the same tags, though each shows links in its own way.

The five tags every article needs

<meta property="og:title" content="The article's headline">
<meta property="og:description" content="One or two sentences about it">
<meta property="og:image" content="https://example.com/images/article.jpg">
<meta property="og:url" content="https://example.com/the-article">
<meta property="og:type" content="article">
  • og:title: the headline as you want it shown. Keep it short: apps cut long titles in different places.
  • og:description: a short summary. Long ones are cut by the network.
  • og:image: the full address of the picture, starting with https://. A relative address such as /images/a.jpg does not work.
  • og:url: the article's own address, the same as its canonical link.
  • og:type: article for articles, website for the home page.

Choose a good preview image

An image of 1200 × 630 pixels (about 1.91:1), as JPEG or PNG, is a good target for a large landscape preview. Use a full https:// address, and add og:image:width and og:image:height if you can. Apps may crop the picture differently on different devices, so keep important text away from the edges and check the result in the Sharing Debugger.

Most systems add them for you

WordPress SEO plugins such as Yoast and Rank Math, Ghost, Blogger and most news systems write these tags already. Check that each article has its own picture set, often called the featured image.

Check a page before you share it

  1. Open the article, view the page source, and search for og:.
  2. Or paste the address into Facebook's Sharing Debugger, which shows exactly what Facebook sees.

Fixed the tags, but the old preview still shows?

Facebook remembers a page's preview for some time. In the Sharing Debugger, press Scrape Again to make it read the page anew. Posts already published keep their old card; new shares get the new one.

Where AutoPostToSocial fits

We prepare your article's text and link for each network. Facebook builds the preview from these tags, and Threads shows the link in its own way. Good tags make every automatic post look as if you made it by hand. How it works.

Get it when the beta opens

Unlimited accounts on every plan. Free during the beta.

Join the beta