Open Graph testing guide

Test the whole link preview, not only the image file

A well-designed Open Graph image can still fail if the page metadata is incomplete, the image URL is blocked or a social network has cached an older preview. Treat the image, HTML metadata, public URL and platform cache as one publishing system.

Practical guideUpdated 2026-11-13

Publish a complete image definition

Upload the exported image to a stable public HTTPS URL, then add og:title, og:description, og:url and og:image to the page head. The Open Graph protocol also defines useful image properties for secure URL, MIME type, width, height and alternative text.

Use an absolute image URL, not a path that only works relative to the page. Confirm that the image opens in a private browser window without authentication, cookies or a blocked hotlink request.

Use a predictable preview canvas

A 1.91:1 landscape image is a dependable starting point for link previews. ImageFromText exports 1200 × 627, which matches LinkedIn’s documented website sharing guidance. Keep important words and logos inside generous margins because other services may crop or overlay the preview differently.

  • Keep the headline shortThe page title appears beside the preview on many surfaces, so the image does not need to repeat every word.
  • Describe the visible imageSet og:image:alt to a useful description rather than a filename or promotional slogan.
  • Declare dimensions and typeWidth, height and MIME type help parsers understand the asset before or while fetching it.
  • Avoid text at the edgesAllow for crops, rounded containers and interface overlays.

Test after the final URL is live

  1. Open the page sourceConfirm the deployed canonical page contains the expected Open Graph values and only the intended primary image.
  2. Open the image URL directlyCheck status, content type, HTTPS access and the final dimensions.
  3. Run platform inspectorsUse the LinkedIn Post Inspector and Meta Sharing Debugger to request a fresh fetch and review parser warnings.
  4. Share a private testInspect desktop and mobile previews before a campaign or announcement makes the URL public.

When an old preview refuses to change

First confirm the live HTML and image URL have changed. Then ask the platform inspector to fetch the page again. If a cache remains stubborn, publish the revised image under a new versioned filename and update og:image; do not change the canonical page URL merely to refresh a picture.

Primary references

Platform specifications change. These first-party references were checked when this guide was updated.