This guide shows you how to stop Facebook from picking the wrong image when you share a link. You’ll learn how to force Facebook to use the exact photo you want, either by editing the page’s meta tags or by using Facebook’s own debugging tool to refresh its cache.
What You’ll Need
- Access to the HTML source code of the webpage you’re sharing (or a plugin if you use a CMS like WordPress)
- A Facebook account (for the Sharing Debugger tool)
Step-by-Step
- Identify the image you want to use. It should be at least 1200 x 630 pixels for optimal display. Smaller images may work but will look blurry or be cropped awkwardly.
- Add the Open Graph image tag to your page’s HTML. In the
<head>section of your webpage, add or edit this line:<meta property="og:image" content="https://yourdomain.com/path/to/your-image.jpg" />
Replace the URL with the direct link to your chosen image. The image must be publicly accessible (not behind a login or a hotlink-protected server). - Add the Open Graph URL tag (recommended). To prevent Facebook from getting confused by tracking parameters or duplicate URLs, add:
<meta property="og:url" content="https://yourdomain.com/your-page/" />
Use the canonical URL of the page. - Add the Open Graph title and description (optional but recommended). These help Facebook understand your page and often influence which image it picks. Add:
<meta property="og:title" content="Your Page Title" /><meta property="og:description" content="A short description of your page." /> - If you use WordPress or another CMS, use a plugin. Plugins like Yoast SEO or Rank Math let you set the social image without editing code. Look for a “Social” or “Facebook” tab in the post editor and upload your image there.
- Save your changes and publish the page.
- Clear Facebook’s cache using the Sharing Debugger. Go to developers.facebook.com/tools/debug/. Paste your URL into the input box and click “Debug”.
- Click the “Scrape Again” button. This forces Facebook to fetch the page again and read your new meta tags. You may need to click it a couple of times if the first scrape doesn’t pick up the change.
- Check the preview. The debugger will show you exactly what image and text Facebook sees. If it still shows the wrong image, go back to step 2 and double-check the image URL is correct and the file is accessible.
- Test by sharing the link. Paste the link into a Facebook post or a private message to yourself. The preview should now show your chosen image.
Common Mistakes
- Using a relative URL. The
og:imagecontent value must be an absolute URL (starting withhttps://), not a relative path like/images/photo.jpg. - Forgetting to clear the cache. Facebook caches link previews aggressively. If you don’t use the Sharing Debugger to scrape again, you’ll keep seeing the old image for hours or days.
- Image too small. Facebook recommends 1200 x 630 pixels. If your image is smaller, it may be ignored in favor of another image on the page.
- Multiple og:image tags. If you have more than one, Facebook may pick the last one or a random one. Keep only one.
- Using a page with dynamic content. If your page shows different images based on who visits (e.g., a user-specific dashboard), Facebook will see the default version. Make sure the og:image tag is static.
Tips
- Use the debugger’s “Show existing scrape info” to see what Facebook currently has cached before you scrape again.
- Add
og:image:widthandog:image:heighttags to help Facebook render the image correctly. Example:<meta property="og:image:width" content="1200" />and<meta property="og:image:height" content="630" />. - For WordPress, check your theme’s SEO settings. Some themes have a built-in social sharing image field that overrides plugins.
- If you’re sharing a page you don’t control (like a news article), you can’t change the meta tags. You can only upload a custom image when you paste the link into a Facebook post—look for the photo icon in the preview box to replace it.
- Use a PNG or JPG. Facebook supports these formats reliably. Avoid WebP or BMP.
Troubleshooting
I scraped again but the old image is still there. Wait a few minutes and scrape again. Facebook’s cache can take a few attempts to refresh. Also, verify the image URL is not blocked by a firewall or a hotlink protection service.
The debugger shows an error about the image. The error message will usually tell you the problem—common ones are “Image URL is not accessible” or “Image is too small.” Fix the URL or use a larger image.
I added the meta tags but the debugger doesn’t see them. This usually means the page you’re debugging is not the same page where you added the tags. Check that you added them to the exact URL you’re pasting into the debugger. Also, clear any caching plugin on your site (like W3 Total Cache or WP Super Cache) before scraping.
Facebook is picking an image from a different part of the page. If you have multiple images and no og:image tag, Facebook guesses. Adding the tag is the only reliable fix. If you have the tag and it’s still wrong, make sure there’s only one og:image tag and that it’s not commented out in your HTML.
The preview in the debugger is correct, but my post shows the wrong image. This can happen if you pasted the link into Facebook before scraping. Delete the draft post and paste the link again. If it persists, log out of Facebook and log back in to clear your own session cache.
Frequently Asked Questions
Q: Why does Facebook ignore my og:image tag?
A: The most common reasons are a wrong URL (relative instead of absolute), an image that’s too small, or a cached version. Use the Sharing Debugger to see what Facebook actually reads.
Q: Can I force Facebook to use a specific image without editing the website?
A: Yes, but only for a single post. After you paste the link into the post composer, click on the preview and select “Edit” or the photo icon to upload a custom image. This won’t change what others see when they share the link.
Q: How long does Facebook cache a link preview?
A> There’s no fixed time. It can be minutes or weeks. Using the Sharing Debugger’s “Scrape Again” button is the only way to force an immediate refresh.
Q: What image size should I use for the best Facebook preview?
A: Use 1200 x 630 pixels. This is the standard size for a link share and will avoid cropping.
Q: Does the og:image tag work for WhatsApp and LinkedIn too?
A: Yes, most social platforms and messaging apps support Open Graph tags. LinkedIn has its own debugger, and WhatsApp generally uses the same tags as Facebook.
Q: I don’t have access to the HTML. Is there another way?
A: If you’re on a platform like Wix, Squarespace, or Shopify, look for a social sharing settings panel in the page editor. Most website builders have a field for a social share image. If not, you’ll need to ask your web developer to add the tag.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Set a Google Play Budget & Stop Accidental Purchases
- Destiny 2 Error Code Anteater: Fixes & Causes
- View Android Photos on Chromebook: Step-by-Step
- Fix Windows Could Not Prepare the Computer to Boot
- Windows 11 Security Settings: Best Config Guide
- Install Custom Recovery on Samsung Galaxy Trend