A link preview is built from a few lines in your page's <head>. When someone pastes your post into a chat, a social network or a work tool, that app fetches the page, reads those lines and builds the card: title, short description and image. Get them right once in your blog template and every post shares with a proper image.
1. Make the image
Create a 1200 x 630 PNG with your post title on it. The featured image maker does this in a minute and gives you the matching tags with the right width and height filled in. See the Open Graph image size guide for where that number comes from.
Name the file after the post, for example page-load-time-1200x630.png. Descriptive names make it easy to find later and avoid two posts sharing a file by accident.
2. Upload it somewhere public
Put the file in your blog's media library or static folder. Then open its URL in a private browser window to make sure it loads without a login. If it does not load for you logged out, it will not load for the platforms either.
3. Add the tags
The Open Graph protocol requires four properties on every page: og:title, og:type, og:image and og:url. Width, height and alt text are optional, but the spec says a page with an og:image should also have og:image:alt, and width and height help apps lay out the card before the image arrives. Source: ogp.me.
<meta property="og:title" content="How we cut our page load time in half"> <meta property="og:type" content="article"> <meta property="og:url" content="https://example.com/blog/page-load-time"> <meta property="og:image" content="https://example.com/images/page-load-time-1200x630.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="630"> <meta property="og:image:alt" content="Title card: How we cut our page load time in half">
Put these inside the <head> of each post. Use absolute URLs, starting with https://, and give each post its own og:url and og:image. Relative paths such as /images/card.png are a common reason previews show no image.
If you use a blog platform
Most blog platforms, themes and SEO plugins write these tags for you, usually from the post's featured image or a separate social image field. Look for "social image", "share image" or "Open Graph" in the post settings before adding tags by hand. If you add your own tags as well, you can end up with two og:image tags, and each app picks one in its own way.
If you write your own templates
Generate the tags from the post's data: title, canonical URL, image path and image size. Keep the image dimensions next to the file name in your content, so the width and height tags are always correct even if you change the size later.
4. Check the preview
- View the page source and search for og:image to confirm the tag appears exactly once.
- Paste the link into Meta's Sharing Debugger and LinkedIn's Post Inspector; both show the preview they build and can fetch the page again after you change something.
- Paste the link into a draft post on each network you use, check it, then delete the draft.
- Send the link to yourself in a messaging app and look at the card on your phone.
Common problems
- Old image still showing. The platform cached the first version it saw. Use its debug tool to fetch the page again, or change the image file name so the URL is new.
- Image cropped badly. The ratio is off. Use 1200 x 630 and keep text away from the edges.
- No image at all. The URL is relative, blocked by a login, or the file is too large. Meta states an 8 MB limit and LinkedIn 5 MB.
- Wrong title in the card. og:title is missing or a plugin sets a different one. Check the page source for duplicates.
Updating images on older posts
You do not need to redo every old post at once. Start with the posts people still share or find through search, give each one its own image, and check each link in the debug tools afterwards so the new image replaces the cached one. Keep the old file names out of the way rather than overwriting them; a new file name is the most reliable way to make platforms fetch the new image.
Alt text that helps
og:image:alt describes what is in the image for people who cannot see it. For a title card, say so: "Title card: How we cut our page load time in half". Our maker fills this in from your title, and escapes characters such as quotes so they cannot break the tag.
Ready? Open the featured image maker, make the image, and copy the tags from below the preview.