Tutorials8 min read

How to Test Your Open Graph Images Before Publishing

Step-by-step guide to testing OG images on Facebook, Twitter/X, LinkedIn, Discord, and Slack. Includes debugging tips and a multi-platform testing checklist.

Pixola Team·

You have added your Open Graph meta tags, uploaded your image, and deployed. But when you paste the link on Twitter, the preview shows the wrong image. Or no image at all.

Testing OG images before sharing is a critical step that most people skip. Every platform caches OG data differently, and what works on Facebook might break on LinkedIn. This guide walks you through testing your OG images on every major platform.

Why You Need to Test OG Images

Social platforms do not re-fetch your page every time someone shares a link. They cache the OG data (title, description, image) the first time the URL is scraped, and serve that cached version for subsequent shares. This means:

  • If your OG tags had an error when the page was first shared, that error is cached
  • If you update your OG image, the old one may persist for hours or days
  • Different platforms cache and render OG data differently — what works on one may not work on another

Facebook Sharing Debugger

Facebook's Sharing Debugger is the most detailed OG testing tool available. It shows you exactly what Facebook sees when it scrapes your page.

How to use it

  1. Go to developers.facebook.com/tools/debug/
  2. Paste your URL and click “Debug”
  3. Review the scraped OG tags, image preview, and any warnings
  4. Click “Scrape Again” to force Facebook to re-fetch your page (useful after updating OG tags)

What to check

  • og:image resolves to the correct image and displays at the expected size
  • og:title and og:description are not truncated or showing fallback values
  • No warnings about image size, missing tags, or redirect chains
  • The canonical URL matches what you expect

Common issues the debugger catches

  • Image too small (minimum 200 × 200 pixels for Facebook)
  • Image URL returns a redirect chain that Facebook cannot follow
  • Page returns a non-200 status code
  • SSL certificate issues preventing the scraper from accessing the page

Twitter/X Card Validator

Twitter/X has its own card system that takes priority over OG tags when Twitter-specific meta tags are present.

How to use it

  1. Go to cards-dev.twitter.com/validator
  2. Paste your URL and click “Preview card”
  3. Check that the image renders correctly and the card type (summary vs summary_large_image) matches your intent

What to check

  • Card typesummary_large_image shows a large image above the title; summary shows a small square thumbnail. Make sure you have twitter:card set to the right type.
  • Image cropping— Twitter/X crops images to fit its card dimensions. Check that important content is not cut off.
  • Fallback behavior — If twitter:image is not set, Twitter/X falls back to og:image. Verify the fallback looks correct.

LinkedIn Post Inspector

LinkedIn caches OG data aggressively and sometimes does not update even after you clear the cache. The Post Inspector helps.

How to use it

  1. Go to linkedin.com/post-inspector/
  2. Paste your URL and click “Inspect”
  3. Review the preview and check for warnings
  4. Click “Inspect” again to force a refresh

LinkedIn-specific notes

  • LinkedIn recommends 1200 × 627 images (slightly different from the standard 630 height, but 630 works fine)
  • If no OG image is set, LinkedIn will grab the first large image it finds on the page — which may not be what you want
  • LinkedIn sometimes takes up to 7 days to fully clear its cache, even after using the Post Inspector

Discord and Slack

Discord and Slack both generate “unfurls” (rich link previews) by scraping OG tags. They do not have dedicated debugging tools, but you can test them directly.

Discord

  • Paste the URL in any Discord channel to see the embed preview
  • Discord respects og:site_name in the embed header and shows a colored sidebar based on the <meta name="theme-color"> tag
  • To force Discord to re-fetch, you can edit the message (remove and re-paste the URL) or wait approximately 15 minutes

Slack

  • Paste the URL in any Slack channel to see the unfurl
  • Slack shows og:site_name as the source label and renders the image below the title/description
  • Slack caches unfurls for approximately 30 minutes. You can also click the refresh icon on the unfurl in some Slack clients

Multi-Platform Testing Checklist

Use this checklist every time you deploy new or updated OG tags:

  1. Verify meta tags in HTML source. View the page source or inspect the <head> in DevTools. Confirm all required OG tags are present and have correct values.
  2. Check image accessibility. Open the og:image URL directly in a browser. It should load without authentication, redirects, or errors.
  3. Test on Facebook.Use the Sharing Debugger. Click “Scrape Again” to get fresh data.
  4. Test on Twitter/X. Use the Card Validator. Confirm the card type is correct.
  5. Test on LinkedIn. Use the Post Inspector. Check for image cropping issues.
  6. Test on Discord/Slack. Paste the URL in a test channel and verify the preview.
  7. Test on mobile. Share the link in a mobile messaging app (iMessage, WhatsApp) and verify the preview renders correctly on a small screen.

Debugging Common Issues

Image not updating after changes

This is almost always a caching issue. Use each platform's debug tool to force a re-scrape. If that does not work, try appending a version parameter to the image URL: og-image.png?v=2. Platforms treat this as a new URL.

Image appears on some platforms but not others

Check that the image URL is accessible without authentication or cookies. Some CDNs or WAFs block social media scrapers. Verify your server returns a 200 status code (not a redirect) for the image URL when accessed by a non-browser user agent.

Image is cropped incorrectly

Different platforms crop to different aspect ratios. The safest approach is to use 1200 × 630 pixels and keep important content within a 60-pixel safe zone from all edges.

Preview shows old or wrong title/description

Verify that your meta tags are in the initial HTML response (not injected by client-side JavaScript). Social media scrapers do not execute JavaScript. If you are using a SPA framework, ensure server-side rendering is enabled for the <head> tags.

“Could not fetch” errors in debuggers

This usually means the platform's scraper cannot reach your server. Common causes: the page is behind authentication, the server is blocking the scraper's user agent, the SSL certificate is invalid, or the page returns a non-200 HTTP status code. For more troubleshooting, see OG Image Not Showing? How to Fix Common Issues.

Automating OG Image Testing

For sites with many pages, manual testing is impractical. Consider adding automated OG image validation to your CI/CD pipeline:

  • Use a headless browser or HTML parser to extract meta tags from rendered pages and verify required tags are present
  • Check that all og:image URLs return 200 status codes and are valid images
  • Verify image dimensions match the expected 1200 × 630
  • Flag pages missing required OG tags in your build output

Generate Better OG Images

Testing is easier when you start with the right image. Pixola's OG Image Generator creates 1200 × 630 images optimized for social sharing — the correct dimensions, file size, and format from the start. No more manual resizing or format conversion.

Generate OG Images with AI

Stop using the same templates as everyone else. Create unique Open Graph images with AI on Pixola.

Try OG Image Generator — Free
og imagetestingdebuggingsocial media