How to Test a Website Preview Image Before Sharing
Check your public Open Graph tags, confirm the image loads for crawlers, and verify the final card in the platform where you will share it.

Direct answer: inspect the public page response for its Open Graph title, description, and image URL; open the image URL as a crawler would; render a preview with a checker; then paste the link into the destination platform’s own inspector or an unpublished draft. A checker is a first pass, not a guarantee of the final crop or layout.
What a link preview actually uses
When someone shares a URL, the destination service fetches the public page and reads metadata from the response. The visible card is usually a combination of title, description, and image. A CMS preview can differ from the HTML that an unauthenticated crawler receives, so inspect the deployed URL itself.
The image must also be reachable. Login walls, robots or firewall rules, hotlink protection, a non-public image host, and metadata inserted only after client-side JavaScript can all prevent a crawler from seeing the intended asset.
Step 1: Publish a crawler-visible page
- Use the exact URL you will share, including its canonical host, path, and query string.
- Open it in a private browser window to confirm it does not require a session.
- Check that the server response contains the metadata in the initial HTML. Do not rely only on fields shown in your CMS editor.
- Confirm the page and image are available over HTTPS and do not depend on a local development hostname.

Step 2: Inspect the raw HTML
Start with the response headers and HTML. This catches redirects, authentication, and server-side rendering problems before you use a preview checker.
curl -L -sS https://example.com/article \
-H 'User-Agent: Mozilla/5.0' \
| grep -iE '(|og:title|og:description|og:image|twitter:card|twitter:image)'
Look for one intended value for each of these fields:
og:title: the share title.og:description: supporting text.og:image: an absolute, publicly reachable image URL.og:url: the canonical URL, when your site uses canonical metadata.twitter:cardandtwitter:image: optional Twitter/X-specific overrides when your sharing plan needs them.
Inspect the actual response rather than assuming the CMS values were emitted. If the tags are missing from the first response and appear only after JavaScript runs, a crawler may not see them.
Check the image response separately
curl -I -L https://cdn.example.com/images/share-card.jpg
Confirm that the final response is successful, serves an image content type, and does not redirect to a login page or an HTML error document. Also check that the URL can be fetched without cookies or a browser session.
Step 3: Render a preview checker
Paste the public URL into an Open Graph or social preview checker. Review the fetched title, description, image URL, and rendered card. Treat the result as a metadata and fetchability check: third-party mockups can use a different crop, text wrapping, or card layout from the destination app.
Compare the rendered card with the source image at likely display sizes. Keep the subject visible near the center, check that embedded text remains readable after cropping, and make sure important edges are not carrying essential information. There is no single image dimension that applies to every destination.
Step 4: Verify in the destination platform
Use the platform’s URL inspector when one is available, or paste the URL into an unpublished post or draft and inspect the resulting card. This is the deciding check because it uses the platform’s own crawler, cache, crop, and layout.

For LinkedIn, distinguish an article URL share from a directly uploaded image. LinkedIn documents those as separate flows; the Images API’s supported formats and pixel ceiling apply to API image assets, not as a universal requirement for every organic link preview. See the LinkedIn Images API documentation for that specific limit (fewer than 36,152,320 pixels).
Step 5: Test the same kind of share you will publish
- URL/article share: paste the link and inspect the generated card.
- Direct image upload: upload the file itself and check the resulting post; page metadata is not used in the same way.
- Private or team-only draft: use this when the platform’s inspector is unavailable, then discard the draft after checking.
Repeat the check after changing the URL, image, title, or description. A platform may retain an older fetch, so a correct page can still produce an old card temporarily.
Automate a repeatable check
Python: fetch and validate the core tags
import requests
from bs4 import BeautifulSoup
from urllib.parse import urljoin
page_url = "https://example.com/article"
r = requests.get(page_url, timeout=20, headers={"User-Agent": "preview-check/1.0"})
r.raise_for_status()
soup = BeautifulSoup(r.text, "html.parser")
def meta(property_name):
tag = soup.find("meta", attrs={"property": property_name})
return tag.get("content", "").strip() if tag else ""
title = meta("og:title")
description = meta("og:description")
image = urljoin(page_url, meta("og:image"))
print({"title": title, "description": description, "image": image})
if not image:
raise SystemExit("Missing og:image")
image_response = requests.get(image, timeout=20, allow_redirects=True,
headers={"User-Agent": "preview-check/1.0"})
image_response.raise_for_status()
content_type = image_response.headers.get("content-type", "")
if not content_type.startswith("image/"):
raise SystemExit(f"Not an image response: {content_type}")
Node.js: fetch and extract tags
const pageUrl = 'https://example.com/article';
const res = await fetch(pageUrl, {
headers: { 'user-agent': 'preview-check/1.0' }
});
if (!res.ok) throw new Error(`Page returned ${res.status}`);
const html = await res.text();
const getMeta = (property) => {
const escaped = property.replace(':', '\\:');
const match = html.match(new RegExp(`]+property=["']${escaped}["'][^>]+content=["']([^"']*)`, 'i'));
return match ? match[1] : '';
};
const image = new URL(getMeta('og:image'), pageUrl).href;
console.log({ title: getMeta('og:title'), description: getMeta('og:description'), image });
const imageRes = await fetch(image, { method: 'HEAD' });
if (!imageRes.ok) throw new Error(`Image returned ${imageRes.status}`);
if (!(imageRes.headers.get('content-type') || '').startsWith('image/')) {
throw new Error('og:image did not return an image content type');
}
Or skip the browser setup
ScreenshotNeo can capture the public URL so you can inspect the actual page image in an automated workflow. Its consent step accepts cookie banners before capture 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 are not billed, and the response reports the page verdict and billing status in X-Page-Verdict and X-Billed headers. It also provides an MCP server for Claude, Cursor, and other MCP clients, with take_screenshot, get_page_info, and capture_pdf tools.
See the ScreenshotNeo API documentation for all options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/article -o shot.webp
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)
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}`);
One thousand screenshots a month are free with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
Troubleshooting checklist
| Symptom | Likely cause | Fix |
|---|---|---|
| No image or a blank card | Missing og:image, inaccessible URL, or crawler block |
Inspect the raw response, open the absolute image URL without cookies, and review robots, firewall, and authentication rules. |
| CMS preview differs from the checker | The editor value was not emitted in public HTML | Check the deployed response and server-side template output. |
| Checker is right but the live platform is wrong | Different crop, cache, or crawler behavior | Use the platform inspector or a draft as the final authority. |
| Old image after an update | Cached preview data | Re-fetch with the platform’s available inspection tool; cache refresh timing differs by service. |
| Image URL redirects to HTML | CDN or access rule sends crawlers to a login/error page | Serve the image directly with a public response and an image content type. |
| LinkedIn API upload rejected | Unsupported format or asset exceeds the documented pixel ceiling | Use JPG, GIF, or PNG and stay below 36,152,320 pixels for that API asset path. |
Performance, reliability, and cost
- Performance: check the page and image independently; a fast HTML response does not help if the image host is slow or blocked.
- Reliability: run checks from an unauthenticated environment and repeat after deploys that change metadata, CDN rules, or image URLs.
- Automation: cache your own metadata results, but keep a platform-native verification step before a high-visibility post.
- Cost: a preview checker may be enough for occasional manual work. For scheduled screenshots, ScreenshotNeo bills only clean shots; bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing.
Final pre-share checklist
- Exact public URL tested.
og:title,og:description, andog:imagepresent in the initial response.- Image URL returns an image without login or cookies.
- Subject and any embedded text survive likely crops.
- Target platform inspector or draft matches the intended card.
- Share type confirmed: URL card versus direct image upload.
FAQ
Can I trust an Open Graph checker completely?
No. It is useful for tags and fetchability, but the destination platform controls its own crop, cache, and layout.
Should I use one universal image size?
No universal size is established by the evidence here. Test the real destination card and keep important content away from edges likely to be cropped.
Why does a logged-in browser show metadata that a checker cannot see?
Your session may unlock the page, while the crawler receives a login page, a blocked response, or HTML without client-rendered metadata.
Does a LinkedIn uploaded image follow the same rules as a shared article URL?
No. LinkedIn documents URL/article sharing and direct image uploads as separate flows, with API constraints applying to the upload path.


