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

Set the page’s sharing image with an og:image tag in the document’s <head>. Use an absolute URL to the image, keep og:url aligned with the page’s canonical URL, and then inspect the page with the destination platform’s preview tool. A complete minimal setup also includes og:title, og:type, and og:description.

The minimum Open Graph markup

Open Graph metadata belongs in the HTML document head. The protocol identifies four basic properties for a page: og:title, og:type, og:image, and og:url. The image property is the URL of the picture that represents the page; the URL property is the canonical identifier for that page.

<head prefix="og: https://ogp.me/ns#">
  <meta property="og:title" content="Page title">
  <meta property="og:type" content="website">
  <meta property="og:url" content="https://example.com/page">
  <meta property="og:image" content="https://example.com/images/page-share.jpg">
  <meta property="og:image:alt" content="A short description of the image">
  <meta property="og:description" content="A short page description">
</head>

Replace every illustrative value. The image URL should resolve directly to the intended file, and the URL in og:url should match the page’s canonical address rather than a tracking or session URL. og:description is optional in the protocol but generally recommended for a useful preview.

What each tag controls

og:image

This is the property that selects the representative thumbnail. Use a complete HTTPS URL that a crawler can request without logging in. A relative path such as /images/share.jpg is less portable because social parsers may not resolve it consistently.

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.
#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

og:title and og:description

These provide the preview headline and supporting text. Write them for the shared page, not for the site as a whole. Keep the wording useful when the link is viewed out of context.

og:type

For an ordinary article, landing page, or home page, website is the usual value. Use a different type only when your implementation and the platform specifically require it.

og:url

This is the object’s permanent identifier. Set it to the canonical version of the page so that HTTP and HTTPS, trailing-slash, or tracking-parameter variants do not represent separate objects.

og:image:alt

This describes the image; it is not a caption. The Open Graph specification says an image should specify it. Keep it concise and describe meaningful visual content rather than repeating the page title.

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

Add image dimensions and format metadata when useful

Open Graph defines optional structured properties for an image. Place each structured property immediately after the og:image declaration it describes.

<meta property="og:image" content="https://example.com/images/page-share.jpg">
<meta property="og:image:alt" content="A dashboard showing monthly traffic">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="627">
<meta property="og:image:type" content="image/jpeg">
<meta property="og:image:secure_url" content="https://example.com/images/page-share.jpg">

og:image:type should describe the actual media type, such as image/jpeg or image/png. The secure URL is useful when the page is HTTPS and you want to declare the HTTPS image explicitly.

Choose dimensions for the platform you actually use

There is no single universal thumbnail-size rule established here. LinkedIn’s published link-sharing guidance is specific to LinkedIn: it lists a 5 MB maximum file size, minimum dimensions of 1200 × 627 pixels, and a recommended 1.91:1 ratio. LinkedIn says images under 401 pixels wide display as thumbnails. Treat those as LinkedIn requirements, not guarantees for every network.

Decision What to check Verified guidance
Dimensions Minimum width and height accepted by the target LinkedIn: at least 1200 × 627 pixels
Aspect ratio Whether the platform crops the sides or top and bottom LinkedIn recommends 1.91:1
File size Maximum download size LinkedIn: 5 MB maximum
Small images Whether the preview becomes a small thumbnail LinkedIn says under 401 pixels wide display as thumbnails
Format Accepted image types and transparency behavior Confirm in the target platform’s current documentation

Design important text away from the edges because a platform may crop the source into a different card shape. Export a readable image, keep its file below the applicable limit, and check the final preview rather than relying only on your source dimensions.

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

Declare more than one image without creating ambiguity

A page may contain several og:image properties. When values conflict, the first image takes preference. That makes ordering significant: put your preferred thumbnail first.

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

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

Keep every width, height, type, secure URL, and alt value with its corresponding root image. An additional og:image starts a new group of structured properties. If you do not need a fallback, publish one image to reduce parser confusion.

Implement tags in a CMS or framework

Static HTML

Edit the source template that renders the page’s <head>. View the deployed page source—not only a local template—to confirm the tags are present in the returned HTML.

Server-rendered applications

Generate title, description, canonical URL, and image URL from the same page data. Escape attribute values correctly, and ensure the image URL is absolute after deployment.

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

Client-rendered applications

If the initial HTML contains no metadata and JavaScript adds it later, some crawlers may miss it. Prefer server-side or pre-rendered head tags when the platform’s parser does not execute your application reliably.

CDN and image-hosting checks

  • Return the image at the exact URL in og:image.
  • Use a correct Content-Type response for the file.
  • Do not require cookies, a browser session, or an interactive challenge to download it.
  • Keep redirects simple and verify that HTTPS certificates are valid.

Test the deployed preview

  1. Open the public page in a private browser window and copy its final URL.
  2. View the HTML source and search for og:image, og:url, and og:title.
  3. Open the image URL directly. Confirm that it loads without authentication and that the dimensions and format are what you intended.
  4. Use the destination network’s official inspector or debugger. The Open Graph protocol identifies Facebook Object Debugger as Facebook’s official parser and debugger; use each other platform’s current official tooling for its own preview.
  5. Compare the debugger’s parsed values with the source. If they differ, fix the deployed HTML or image response, then run the inspection again.

Preview tools can retain a previously fetched result. There is no universal cache-refresh schedule across platforms, so follow the target service’s current re-scrape or refresh controls rather than assuming an immediate update.

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

Troubleshoot a wrong or missing thumbnail

The old image still appears

Check the live source for duplicate og:image tags and confirm the intended image is first. Then request a fresh inspection in the platform’s debugger. A browser refresh alone does not prove that the platform has fetched the page again.

The platform chooses another image

Look for multiple root image declarations, theme-generated metadata, or a plugin that emits its own tags. Remove unintended declarations or move the preferred image to the first position.

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

No image is shown

Confirm the tag is inside <head>, uses an absolute URL, and points to a publicly downloadable file. Check for HTTP errors, access controls, invalid certificates, and a response type that does not match the file.

The image is cropped badly

Rework the source composition for the target aspect ratio. On LinkedIn, use at least 1200 × 627 pixels and the recommended 1.91:1 ratio, while staying under its 5 MB limit.

The title or description is wrong

Inspect the exact deployed HTML for duplicate tags, stale server-rendered data, and URL variants. Make sure the page-specific values are generated for the URL being shared.

Only a small thumbnail appears on LinkedIn

LinkedIn says images under 401 pixels wide display as thumbnails. Supply a larger source that also meets its 1200 × 627 minimum when you want the larger sharing treatment.

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

Or skip the browser setup

ScreenshotNeo can capture the rendered page through one request when you need a visual check of the result. Its API is documented at https://screenshotneo.com/docs/.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/page -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com/page"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com/page' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
  • Cookie banners, newsletter popups, and chat widgets are removed before the shot.
  • Bot checks or CAPTCHAs, blank pages, failed loads, timeouts, and cache hits are not billed; response headers identify the page verdict and billing result.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
  • The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots.

See ScreenshotNeo for the service and create a free account at https://screenshotneo.com/account/sign-up/.

Operational checklist

  • Use one canonical og:url for the page.
  • Put the preferred og:image first.
  • Use an absolute, publicly reachable HTTPS image URL.
  • Add og:image:alt and keep structured properties adjacent to their image.
  • Validate the deployed source and image response.
  • Run the target platform’s debugger after publishing changes.

Frequently Asked Questions

Can I use the same Open Graph image on every page?

Yes, but page-specific images usually communicate the destination more clearly. Whichever approach you choose, keep the declared URL valid and consistent with the page.

Does changing the HTML guarantee an instant preview update?

No. Platforms can retain fetched previews, and their refresh behavior differs. Use the platform’s own inspection or re-scrape mechanism.

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

Is og:image:alt a caption?

No. It is an accessibility-oriented description of the image’s content, not text intended to replace the page title or serve as a caption.

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.18
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.