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

To create a website share thumbnail, add Open Graph (OG) meta tags to the page’s HTML <head>, publish a stable image URL that the social platform can fetch, and verify the rendered tags and image against that platform’s requirements. The minimum OG set is og:title, og:type, og:image, and og:url. Add og:description and og:image:alt for a more complete preview.

What an Open Graph thumbnail is

When someone pastes a page URL into a social network or messaging service, the service may crawl the page and build a preview card. Open Graph is the metadata vocabulary that tells the crawler which title, description, canonical URL and image represent the page. The tags do not create an image by themselves; they point to an image file you host.

Put the tags in the document’s actual <head>. A tag inserted only after client-side JavaScript runs may be missed by a crawler that reads the initial HTML response.

Add the required Open Graph tags

Use the page’s real canonical URL and an absolute, publicly fetchable image URL. This example is suitable for an article or ordinary website page:

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.
<head>
  <title>Example article</title>
  <meta property="og:title" content="Example article">
  <meta property="og:type" content="website">
  <meta property="og:url" content="https://example.com/article">
  <meta property="og:image" content="https://example.com/images/article-share.jpg">
  <meta property="og:description" content="A short description of the page.">
  <meta property="og:image:alt" content="A concise description of the share image">
</head>

The protocol defines four required properties:

Property Value to provide Why it matters
og:title The page’s share title Usually becomes the headline in the card
og:type For example, website or an article type Identifies what the URL represents
og:image An absolute URL to the representative image Supplies the thumbnail artwork
og:url The canonical page URL Acts as the page’s permanent graph identifier

og:description is optional but recommended. og:image:alt should describe what is visible in the image, not repeat a marketing caption. A page specifying og:image should provide this alternative text.

Optional image properties

You can add og:image:type (such as an image MIME type), og:image:width, og:image:height, and og:image:secure_url. These can help consumers interpret the asset, but they do not replace a valid, reachable og:image URL.

Design and host the share image

Use a stable, absolute URL

Host the file on your own site or an image host that permits unauthenticated requests. Avoid a URL that requires a login, an expiring token, a hotlink-protection challenge, or a browser-only session. The crawler must be able to request the image directly over HTTPS.

Meet the target platform’s specification

There is no single image size that is optimal for every social network. LinkedIn’s published sharing-module guidance is specific to LinkedIn:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
LinkedIn requirement Published value
Minimum dimensions 1200 × 627 pixels
Recommended aspect ratio 1.91:1
Maximum file size 5 MB
Small-image behavior Images under 401 pixels wide display as a thumbnail image

These figures are LinkedIn specifications, not universal OG rules. Check the current sharing documentation for any other network you target. Keep important text away from the edges, export in a common web format, and compress the file without making text unreadable.

Account for responsive crops

Preview cards can crop or resize an image differently on phones, desktops and feeds. Put the subject and essential wording near the center, and do not rely on tiny text. If the image contains text, ensure the same message remains understandable when the platform displays a smaller card.

Framework and CMS implementation

Static HTML

Edit the template that renders each page and generate unique values from the page title, canonical URL and image path. Confirm that the final response contains the tags, not merely the template source before variables are substituted.

Server-rendered applications

Generate OG tags in the server-rendered document head for each route. Use one canonical URL format consistently (for example, HTTPS and one preferred hostname) so og:url does not split shares between duplicate URLs.

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

Single-page applications

If metadata is added only after hydration, some crawlers may see no tags. Prefer server-side rendering or a prerendered HTML response for shareable routes. Inspect the response received without relying on an interactive browser.

Multiple images and tag ordering

A page may provide more than one og:image. Open Graph consumers prefer the first value from top to bottom when values conflict. Place the image’s structured properties immediately after its root tag, then begin the next image entry with another og:image:

<meta property="og:image" content="https://example.com/images/primary.jpg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="627">
<meta property="og:image:alt" content="Primary article illustration">
<meta property="og:image" content="https://example.com/images/alternate.jpg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="627">
<meta property="og:image:alt" content="Alternate article illustration">

If one image is intended for all platforms, publish it first and remove stale tags from plugins or parent templates.

Verify a thumbnail before publishing

  1. Open the page and inspect the rendered document source. Confirm that all OG tags are inside <head>.
  2. Check that og:title, og:type and og:url match this page, not a default homepage value.
  3. Open the exact og:image URL in a private browser window. It should return the image without authentication, a redirect loop or a challenge.
  4. Check the file’s pixel dimensions, MIME type and byte size. For LinkedIn, use at least 1200 × 627 pixels, a 1.91:1 ratio and no more than 5 MB.
  5. If there are multiple images, make sure the preferred one is first and that its width, height, type and alt tags follow that image’s root tag.
  6. Share the URL again after changes. Platforms can retain a previously crawled preview, so a new fetch may be required before the card changes.

Why the image is missing or wrong

No OG tags in the fetched HTML

Cause: Tags are in the wrong section, malformed, or created only in browser JavaScript. Fix: Put valid <meta property="..." content="..."> elements in the server response’s <head>, then inspect that response again.

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

The URL points to the wrong image

Cause: A relative URL, stale CMS default, typo, or an earlier og:image appears first. Fix: Use one absolute URL, remove obsolete tags, and place the intended image first.

The crawler cannot fetch the image

Cause: The file is in a protected directory, blocked by access rules, requires cookies, or is challenged by a firewall. LinkedIn specifically identifies blocked crawlers and protected image locations as reasons a compliant image may not appear. Fix: Allow the target crawler to request the image anonymously over HTTPS and test the direct URL outside your logged-in session.

LinkedIn rejects the asset

Cause: The image is below 1200 × 627 pixels, exceeds 5 MB, or uses an unsuitable ratio. Fix: Export a LinkedIn-specific version meeting those published limits. An image under 401 pixels wide is shown as a thumbnail rather than the larger sharing image.

The old preview persists

Cause: The platform has cached the URL’s metadata. Fix: Confirm the live HTML and image first, then use the platform’s current preview-refresh process or share a versioned URL when appropriate. The exact debugger workflow varies by platform.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Repeat Offender FB Addict - Straight Outta FB Jail T-Shirt
  • Facebook addiction humor design. The Straight Outta FB Jail design is a fun gift for all the social media addicts in your life.
  • You know someone who only looks at their smartphone and addicted to FB and Co. . Then this graphic is the perfect gift!
  • Lightweight, Classic fit, Double-needle sleeve and bottom hem
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo can create the image from a URL with one request. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; each cleanup step can be disabled. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are free, and response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients.

See the ScreenshotNeo documentation for all options. A direct image request looks like this:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python:

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

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

The Free plan includes 1,000 screenshots a month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Create a free ScreenshotNeo account.

Cost, performance and reliability considerations

  • Serve a reasonably compressed image; a smaller file transfers faster and is less likely to exceed platform limits.
  • Keep image URLs stable. Changing the filename on every deploy can make old shares point to missing assets.
  • Use cache-busting only when you intentionally need a new preview; otherwise, let the platform reuse a stable URL.
  • Test from outside your office network or authenticated browser. A crawler’s permissions, IP reputation and request headers can differ from yours.
  • For generated screenshots, wait for the page’s meaningful content before capture and hide transient UI such as chat launchers. ScreenshotNeo supports waits, custom CSS and JavaScript, selector-based capture, device and retina settings, caching with a chosen TTL, and asynchronous jobs with signed webhooks.

Pre-publish checklist

  • All four required OG properties are present in the HTML head.
  • og:url is the canonical URL for this exact page.
  • og:image is absolute, stable and publicly fetchable.
  • og:image:alt accurately describes the image.
  • The first image is the intended default when multiple images exist.
  • The target platform’s dimensions, ratio and file-size rules are satisfied.
  • The image contains no cookie banner, popup or chat widget that should not be shared.

Frequently Asked Questions

Does Open Graph replace the HTML title tag?

No. Keep a normal <title> for browsers and search interfaces; use og:title for the social preview.

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

Can I use a relative path for og:image?

Use an absolute HTTPS URL. It removes ambiguity for crawlers and makes direct accessibility testing straightforward.

Is LinkedIn’s 1200 × 627 size required by Open Graph itself?

No. It is LinkedIn’s published sharing-module guidance; other platforms can publish different limits.

What should og:image:alt contain?

A concise description of the important visual content, written for someone who cannot see the image.

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.

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.