# Social card preview

Paste a link to see roughly how it'll look when someone shares it, and what's missing or broken in its Open Graph tags and image.

This tool looks up the address you give it (a page, a domain, or an email address, depending on the tool) from this site's server and checks what comes back. Use it in a browser at https://joncphillips.com/tools/social-card-preview/, or add ?url= and the address to that link to run it straight away.

There's nothing quite like launching something, sharing the link, and watching it show up as a plain grey box with no image.

I've done it more than once, and this is the tool I wish I'd had open before hitting post.

## What It Checks

It fetches your page the same way the platforms' crawlers do and reads its `og:` and `twitter:` tags. Then it grabs the image to check its size, shape, and file type.

The previews are close to what each platform shows, but they won't be pixel perfect. The platforms change their designs all the time, and they also cache what they fetched, so the real thing can lag behind for a while.

## The Tags You Need

These five tags cover every platform that shows link previews:

```html
<meta property="og:title" content="The title people will see">
<meta property="og:description" content="One or two sentences about the page.">
<meta property="og:image" content="https://example.com/social/page.jpg">
<meta property="og:url" content="https://example.com/page/">
<meta name="twitter:card" content="summary_large_image">
```

X reads the `og:` tags too, so you only need `twitter:title` or `twitter:image` if you want X to show something different. Adding `og:image:alt` is worth the extra line for anyone using a screen reader.

## Frequently Asked Questions

### What size should an Open Graph image be?

Go with 1200x630 pixels, which is a ratio of about 1.91:1, as a JPEG or PNG under 1 MB. That size gets you the big card everywhere and stays sharp on high-density screens. I'd keep anything important away from the edges, since some platforms crop a little.

### I fixed my tags, so why does the old preview still show?

The platforms cache previews, sometimes for days. Facebook's Sharing Debugger and LinkedIn's Post Inspector both let you ask for a fresh fetch. On X, Slack, and Discord the cache clears on its own eventually, and adding something like `?v=2` to the link you share gets you a fresh preview right away.

### Does it work on localhost or a staging site behind a password?

It doesn't, sorry. The page has to be reachable from the public internet, the same way it does for the platforms themselves.

## Preflight.sh

Preflight scans your codebase for the launch details that are easy to miss, missing social tags included, so you catch them before anything goes live. https://preflight.sh/

More free tools: https://joncphillips.com/tools/
