How to fix a link preview image that is not showing

Your link preview image is not showing. You paste the link into LinkedIn or Slack and get a bare URL, or last month's image. The cause is nearly always one of five things. Each one takes a few minutes to fix once you know which it is.

Updated

How link previews work

When you share a URL, the app sends its own bot, called a crawler, to fetch the page. It reads the Open Graph tags in the HTML head. These are short tags that describe the page. The og:image tag names the picture. The og:title and og:description tags give the text. X also reads its own twitter:card and twitter:image tags. If they are missing, it uses Open Graph.

The crawler does not run your JavaScript and does not log in. It only has the raw HTML it gets on the first try.

Check what the platforms actually see

Before you change anything, look at the tags the way a crawler does. Your browser is not enough. It shows you the page after scripts have run.

The five usual causes

  • The og:image tag is missing. Add a meta tag inside the head of the page. Give it the property og:image and the image URL as its content.
  • The image URL is relative. Crawlers need a full URL that starts with https://. A path like /images/share.png is not enough.
  • Bots can not reach the image. It gives a 404 error or sits behind a login. Or a firewall or robots.txt rule blocks bots.
  • JavaScript adds the tag. If your framework adds meta tags in the browser, crawlers never see them. Build them on the server or when you build the site.
  • The image is the wrong size or too heavy. Use 1200×630 pixels, PNG or JPG, and keep it well under 5 MB. Very small images are skipped or shown as a tiny thumbnail.

Clear the cached preview

Apps keep a saved copy of each preview, at times for days. After you fix the tag, you may still see the old one. Run the URL through Facebook's Sharing Debugger or LinkedIn's Post Inspector. They make the app fetch the page again.

Where there is no such tool, change the image URL itself. Rename the file or add a bit like ?v=2 to the end. The app then treats it as a new image. In chat apps, a preview you already posted will not update. Send the link again in a new message.

Confirm the rest of the head

A preview is more than the picture. If the title or text in the card looks wrong, check all the meta tags on the page. With no og:title, the app uses the title tag. That may be longer than the card can show.

Tools for this guide

All tools →

More guides

All guides →