What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To create a link preview image, make a representative image, publish it at a URL that crawlers can reach, and add Open Graph metadata to the page’s HTML <head>. Start with a 1200 × 630 pixel image, then add og:title, og:type, og:image, and og:url. Test the raw HTML and the image URL on the services where you share the page.

How link preview images work

A social or messaging service fetches your page, reads its metadata, retrieves the image URL, and builds its own card. The Open Graph protocol describes the page as a shareable object; your HTML supplies instructions, but the receiving service controls cropping, caching, and final layout.

og:image is a URL to an image. It is not an image embedded inside the metadata. The minimum Open Graph properties are:

  • og:title — the title shown for the shared object.
  • og:type — commonly website for a normal page.
  • og:image — the representative image URL.
  • og:url — the canonical URL for the object.

Put these tags in the server-returned document head, not only in content added after page load by client-side JavaScript. A crawler must be able to retrieve the HTML and the image without an interactive browser session.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
HTML and CSS: Design and Build Websites
  • HTML CSS Design and Build Web Sites
  • Comes with secure packaging
  • It can be a gift option

Design the image before adding metadata

Use a practical canvas size

A 1200 × 630 pixel canvas (about 1.91:1) is a useful starting point based on current vendor guidance. It is not a universal requirement or guarantee: services can crop, resize, cache, or render the card differently.

Keep the important content inside a safe area

  • Place the subject, logo, and essential words well away from every edge.
  • Prefer one clear visual subject over a dense collage.
  • Use large, high-contrast type because previews are often displayed at small sizes.
  • Do not make the image a text-only duplicate of the page title; the image should add visual context.

Choose one image or several variants

Approach Strength Cost or risk
One broadly proportioned image One asset and one metadata value to maintain May be cropped less effectively in a particular card layout
Platform-specific images Can be tailored to different aspect ratios and text limits More design, storage, and update work
Visual subject with little text Usually remains understandable after cropping or reduction Brand or article details may be less explicit
Text-heavy card Communicates a precise headline at a glance Small type and cropping can make it unreadable

Open Graph permits multiple image entries. When values conflict, its documentation says the first image is preferred, so put the intended default first and do not list an accidental fallback ahead of it.

Create and publish the image

1. Export a web-ready asset

Export the final artwork as a normal image file such as JPEG, PNG, or WebP. Check the pixel dimensions, file extension, and that the file opens correctly before publishing it. Image-editing software is optional; a design tool, code-generated card, or existing brand asset can all work.

2. Put it at a crawler-accessible URL

Upload the file to your normal web host or asset store and use its public HTTPS URL. The URL in og:image must resolve to the intended file when fetched without your logged-in browser session. Avoid URLs that require a cookie, an interactive challenge, or a temporary local development server.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Confirm the server response

Request the page as an ordinary HTTP client and inspect the returned source. Confirm that the metadata appears in the initial HTML and that the image URL returns the image rather than an HTML error page. If your site uses a cache or deployment pipeline, purge or redeploy the page after changing either the tags or the asset.

Add the Open Graph tags

Insert this block inside the document’s <head>, replacing the example values with the page and image you actually published:

<head>
  <meta property="og:title" content="How to Create a Link Preview Image" />
  <meta property="og:type" content="website" />
  <meta property="og:url" content="https://example.com/link-preview-image" />
  <meta property="og:image" content="https://example.com/images/link-preview.jpg" />
</head>

The four properties above are the protocol’s basic set. Use the same canonical URL in your page’s normal canonical-link element when your site has one, so crawlers receive a consistent identity for the page.

Add optional image properties

Open Graph also defines structured properties that describe the selected image:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<meta property="og:image:secure_url" content="https://example.com/images/link-preview.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="A guide to creating link preview images" />
  • og:image:secure_url gives an HTTPS form of the image address.
  • og:image:type states the image MIME type.
  • og:image:width and og:image:height state the pixel dimensions.
  • og:image:alt describes the image; it is not a caption.

These fields are optional structured metadata. Add them when you know the values and can keep them synchronized with the actual file.

Validate the preview before sharing

  1. Inspect raw HTML. View the response source, not only the browser’s live DOM, and verify one correct value for each basic property.
  2. Open the image URL directly. Confirm it resolves publicly, returns an image, and matches the dimensions and content you intended.
  3. Check the canonical URL. Make sure og:url identifies the exact page whose preview you are testing, including the correct protocol and path.
  4. Use the destination service’s current preview or debugger tool. Different services retrieve different fields and apply different layouts, so test where the link will actually be posted.
  5. Recheck after deployment. A corrected tag can still appear unchanged while a service is using a cached fetch.

An NDSS study published in 2020 tested 20 platforms and found that 11 did not show an image in some tested circumstances, such as when image metadata was absent. The same study found the site title on 16 of 20 platforms. Those are bounded results from that sample and experimental setup, not a current universal success rate.

Or skip the browser setup

ScreenshotNeo can create the image asset through a single screenshot request. It removes cookie and consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and each response identifies the page verdict and billing status. Its MCP server lets Claude, Cursor, or another MCP client call take_screenshot, get_page_info, and capture_pdf.

See the full parameter reference in the ScreenshotNeo documentation. This example captures a page as WebP:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" 
  -d access_key=YOUR_API_KEY 
  --data-urlencode url=https://example.com/article 
  -o shot.webp

Python:

import requests
r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://example.com/article"},
    timeout=90,
)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({
  access_key: 'YOUR_API_KEY',
  url: 'https://example.com/article'
});
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
const buffer = Buffer.from(await res.arrayBuffer());
await Bun.write('shot.webp', buffer);

You can request PNG, JPEG, or WebP and control capture options such as full-page mode, a CSS-selected element, viewport and device presets, retina scale, dark mode, custom CSS or JavaScript, waiting conditions, blocked resources, headers, cookies, user agent, timezone, geolocation, transparent backgrounds, resizing, caching TTL, signed image links, asynchronous webhooks, and bulk capture of up to 100 URLs per call. ScreenshotNeo includes 1,000 shots per month free with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot missing or incorrect previews

Symptom Likely cause Fix
No image appears og:image is missing from the raw response, or its URL cannot be fetched Add the tag to the server-rendered head, open the image URL directly, and confirm it returns the intended file
The wrong image appears Several image tags are present and an unintended one comes first Reorder the tags so the desired image is first, or remove stale entries
An old image remains The receiving service has cached the previous fetch Use that service’s current refresh or re-scrape tool, then test again; cache timing differs by service
The card differs between services Each service chooses its own fields, crop, and layout Validate on every target service and keep key visual information away from the edges
The image URL shows an error page Permissions, authentication, redirects, or a deployment path are blocking the crawler Make the asset publicly retrievable and verify the final response and content type
Dimensions look wrong The file’s actual pixel size does not match the metadata or was resized during export Measure the delivered file, then update the dimensions or regenerate the asset

Operational and accessibility considerations

  • Keep the image URL stable when possible; changing it creates another resource for services to fetch and cache.
  • When you replace an image at the same URL, allow for a service’s cache before concluding that the metadata failed.
  • Use descriptive og:image:alt text for the image itself, separate from the headline or caption.
  • Do not assume that a 1200 × 630 file will be displayed uncropped; design with safe margins and test the actual destinations.
  • For multiple images, document which one is the default and keep the first tag intentional.

What to remember

Create a clear image, publish it at a public URL, place the four basic Open Graph properties in the server-returned head, and verify both the HTML and the asset on the services you use. The 1200 × 630 canvas is a practical starting point, not a cross-platform promise; receiving services remain free to crop, cache, or render the preview differently.

Frequently Asked Questions

Is a 1200 × 630 image mandatory?

No. It is practical vendor guidance for a broadly usable proportion, not an official rule that every platform enforces.

Can I list more than one Open Graph image?

Yes. The protocol permits multiple image tags, but the first image takes precedence when values conflict, so order them deliberately.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why does a corrected preview still show the previous artwork?

The receiving service may still have a cached fetch. Use its current refresh or debugging mechanism and allow for service-specific cache behavior.

Quick Recap

SaleBestseller No. 1
HTML and CSS: Design and Build Websites
HTML and CSS: Design and Build Websites
HTML CSS Design and Build Web Sites; Comes with secure packaging; It can be a gift option
$14.94
SaleBestseller No. 2
SaleBestseller No. 4

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.