ScreenshotNeo

BlogHow-to

How to Set a LinkedIn Website Preview Image

Learn how to change a LinkedIn Page preview image and configure Open Graph tags so future website shares show the right artwork.

By the ScreenshotNeo team29 September 20269 min read

How to Set a LinkedIn Website Preview Image

There are two ways to set a LinkedIn website preview image, and they solve different problems:

  • For one LinkedIn Page post: paste the URL into the Page composer, choose Edit, and upload a replacement image.
  • For the default preview of your website: add Open Graph metadata to the page, especially og:image, and make sure LinkedIn can fetch that image.

A post-level image changes one Page post. Open Graph metadata changes the source information LinkedIn uses for future website shares. This guide covers both methods, image dimensions, implementation code, caching, troubleshooting, testing, and an automated way to capture the image with ScreenshotNeo.

1. Choose the right LinkedIn preview method

Method Scope Access needed Best use
Page composer override One LinkedIn Page post Page super admin or content admin You need a special campaign image immediately
Open Graph metadata Your website’s default link preview Website source or developer access Every future share should use the same controlled metadata

Do not assume a custom image selected in the Page composer updates your website’s HTML. It only applies to that post. Likewise, changing og:image does not retroactively edit an already-published Page post.

2. Set a custom image for a LinkedIn Page post

LinkedIn’s Page-post guidance recommends a 1.91:1 image, commonly 1200 × 627 pixels. Images wider than 200 pixels can use the large-image presentation; narrower images may appear as a thumbnail on the left. On mobile, LinkedIn says images are shown without cropping, with subtle white padding for some ratios.

  1. Open your LinkedIn Page while signed in as a super admin or content admin.
  2. Paste the website URL into Start a post.
  3. Wait for LinkedIn to generate the link preview.
  4. Click Edit below the text box.
  5. Use the image control to select the replacement file from your computer.
  6. Use Edit article title if the displayed title also needs to change.
  7. Confirm the audience and publish.

This is the fastest option when the website cannot be changed or when a particular post needs campaign-specific artwork. It is limited to eligible LinkedIn Page administrators; do not assume an ordinary personal-profile post has the same upload control.

3. Set the website’s default preview with Open Graph

For website sharing, LinkedIn uses Open Graph Protocol metadata and/or oEmbeds to determine the title, description, URL, and image. Add these tags inside the page’s <head> element:

Open Graph tags tell LinkedIn which title, description, URL, and image to display.
Open Graph tags tell LinkedIn which title, description, URL, and image to display.
<meta property='og:title' content='Title of the article'>
<meta property='og:image' content='https://example.com/images/article-preview.jpg'>
<meta property='og:description' content='Description that will show in the preview'>
<meta property='og:url' content='https://example.com/article'>

Use an absolute HTTPS image URL that LinkedIn can retrieve. The image should be at least 1200 × 627 pixels, no larger than 5 MB, and preferably use the 1.91:1 ratio. These are platform specifications described in LinkedIn Help’s website-sharing guidance. Keep the important subject away from the extreme edges because previews can be displayed at different sizes.

Minimal HTML template

<!doctype html>
<html lang='en'>
  <head>
    <meta charset='utf-8'>
    <title>How to Set a LinkedIn Website Preview Image</title>
    <meta name='description' content='A practical guide to LinkedIn Page images and Open Graph metadata.'>
    <meta property='og:title' content='How to Set a LinkedIn Website Preview Image'>
    <meta property='og:description' content='Configure the correct LinkedIn preview image for one post or every future share.'>
    <meta property='og:image' content='https://example.com/images/linkedin-preview.jpg'>
    <meta property='og:url' content='https://example.com/linkedin-preview-guide'>
  </head>
  <body>...</body>
</html>

Place the tags in the server-rendered HTML when possible. If JavaScript inserts them only after the page loads, a crawler may see incomplete metadata. Make sure the canonical URL, og:url, and the URL you paste into LinkedIn use the intended HTTPS host and path.

4. Create and prepare the image

  • Target 1200 × 627 pixels, a 1.91:1 ratio.
  • Keep the file at or below 5 MB for website sharing.
  • Use a publicly reachable HTTPS URL.
  • Prefer JPEG, PNG, or WebP supported by your delivery stack; verify that your server returns the correct content type.
  • Keep text and faces inside a safe central area because layouts vary between desktop and mobile.

The Page-post instructions and website-sharing instructions describe related but separate contexts. The Page-post guidance discusses the 200-pixel threshold for large versus thumbnail presentation. The website-sharing guidance specifies the 1200 × 627 minimum and 5 MB maximum. Use the larger website-sharing requirements for your default site metadata.

Generate a screenshot as the preview source

If your preview should show a live landing page, capture it after the layout and consent state are correct. You can automate that capture with a browser library, a self-hosted browser, or a screenshot API. For a production workflow, ScreenshotNeo is the most direct option: it removes cookie banners, newsletter popups, and chat widgets before capture, and only clean shots are billed.

5. Verify that LinkedIn can retrieve the image

A correctly sized file still fails when the crawler cannot access it. Check each of these conditions:

  • The image URL resolves without a login, cookie challenge, or expiring authorization token.
  • Your firewall, CDN, robots policy, or bot protection does not block LinkedIn retrieval.
  • The response is a successful image response, not an HTML error page.
  • The server sends a useful Content-Type, such as image/jpeg or image/png.
  • The image URL does not contain whitespace or malformed escaping.
  • Redirects eventually land on the intended image over HTTPS.

You can inspect the response from a terminal:

curl -I 'https://example.com/images/linkedin-preview.jpg'

Look for a successful status, a sensible content type, and a content length below 5 MB. A HEAD request is useful for a quick check, but also test a normal GET if your CDN treats HEAD differently.

6. Update metadata safely on a live site

  1. Create the new 1200 × 627 image at a stable URL.
  2. Upload it before changing the HTML so the asset is already available.
  3. Update og:title, og:description, og:image, and og:url together.
  4. Deploy the page and request it from an external network.
  5. Paste the exact canonical URL into a new LinkedIn Page composer draft.
  6. Compare the generated title, description, and image with the page source.

When replacing an image at the same path, use a new filename or a cache-busting strategy if your CDN permits it. LinkedIn may retain old preview data. LinkedIn Help advises allowing up to 48 hours after the URL is shared or metadata changes before stale information updates.

7. Troubleshooting LinkedIn preview images

No preview appears after pasting the URL

Wait a few seconds for LinkedIn to fetch the page. Confirm the URL is valid and contains no spaces; LinkedIn documents spaces in URLs as an error condition. Try the canonical HTTPS URL rather than a tracking or shortened URL.

The old image, title, or description remains

Inspect the deployed source, not a local template. Confirm there is only one authoritative set of Open Graph tags and that a framework or plugin has not overwritten them. Then allow up to 48 hours for LinkedIn’s cached preview to refresh.

The image meets the dimensions but is missing

Dimensions do not prove retrievability. Open the image URL in a private browser window, run curl -I, check access-control rules, and review CDN or WAF logs. Remove authentication, IP restrictions, hotlink protection, or bot challenges that prevent LinkedIn from downloading the file.

The preview shows the wrong page

Check og:url, canonical tags, redirects, and URL parameters. A page template may be emitting metadata from a default article instead of the current route. Ensure the URL you share matches the page whose metadata you inspected.

The Page composer has no Edit option

The custom-image workflow is intended for LinkedIn Page super admins and content admins. If you are posting from a personal profile or lack the required Page role, update the website metadata instead or ask a Page administrator to publish the post.

LinkedIn says a URL can still be shared when it cannot retrieve a preview image. Treat that as a retrieval or metadata problem to fix, rather than a reason to abandon the link.

8. Or skip the browser setup

ScreenshotNeo provides a GET-based website screenshot API and an MCP server for developers and AI agents. Its clean capture flow accepts consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets. Each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response identifies the result with X-Page-Verdict and X-Billed headers.

Removing overlays before capture keeps the preview image focused on the page content.
Removing overlays before capture keeps the preview image focused on the page content.

See the ScreenshotNeo documentation for all options. A basic WebP capture is:

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,
)
r.raise_for_status()
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}`);
if (!res.ok) throw new Error(`Screenshot failed: ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));

For a LinkedIn preview, capture a stable page, resize or crop it to 1200 × 627 pixels, keep the final file under 5 MB, and publish it at a public HTTPS URL. ScreenshotNeo also supports full-page capture with lazy images loaded, CSS-selector element capture, dark mode, device presets, custom viewports, retina scale, custom CSS and JavaScript, clicks, selector or network-idle waits, hidden selectors, blocked requests and resource types, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, configurable caching, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. The parameter names used by other screenshot APIs also work, which can simplify migration.

An MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients. Free accounts include 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

9. Performance, reliability, and cost considerations

Performance

Use a dedicated preview image rather than forcing LinkedIn to process a huge page screenshot. Compress the final asset, serve it from a CDN, and avoid redirect chains. For automated captures, wait for the specific hero selector or network idle instead of using an unnecessarily long fixed delay. Cache a stable image URL until the page design changes.

Reliability

Keep the image URL independent of a logged-in application session. If the source page contains consent banners, popups, or chat widgets, remove them before capture so they do not obscure the subject. Record the generated image URL, capture time, and metadata version so you can reproduce a preview when a campaign is updated.

Cost

With ScreenshotNeo, cache hits and unsuccessful page verdicts are not billed. Plans are Free: 1,000 shots/month; Starter: $5 for 3,000; Growth: $15 for 15,000; Pro: $39 for 60,000; Scale: $99 for 250,000; and Business: $249 for 1,000,000. Yearly billing provides two months free, and every feature is available on every plan.

10. Practical checklist

  • Decide whether this is a one-post override or a site-wide default.
  • Use 1200 × 627 pixels and a 1.91:1 ratio.
  • Keep the website-sharing file at or below 5 MB.
  • Add og:title, og:image, og:description, and og:url.
  • Use an absolute HTTPS image URL.
  • Confirm the image is publicly retrievable without a login or bot challenge.
  • Check the deployed HTML and HTTP response.
  • Allow up to 48 hours for stale LinkedIn data to refresh.
  • Use the Page composer’s Edit control when an immediate one-post image is required.

FAQ

Can I change the preview image for a personal LinkedIn post?

The documented custom-upload workflow applies to LinkedIn Page posts for super admins and content admins. For a general website default, use Open Graph metadata.

Does changing og:image change old LinkedIn posts?

No. It controls the metadata LinkedIn retrieves for future shares. Existing posts may retain their previously cached preview.

What if my image is smaller than 1200 × 627?

Create a larger image at the recommended ratio. LinkedIn’s website-sharing guidance specifies at least 1200 × 627 pixels.

How quickly will a corrected image appear?

LinkedIn advises allowing up to 48 hours after a share or metadata update for stale preview information to change.

Can a page be shared without a preview image?

Yes. LinkedIn says the link can still be shared when it cannot retrieve a preview image.