WordPress Posting to Facebook Wrong Picture Displayed

These days to reach a target audience it’s not enough to have a website or blog, a presence on the major social media sources like Facebook, Instagram and Twitter is required. Fortunately with the aid of plugins users can post a WordPress post directly and automatically social media. Most of the time this works very well, but not always. Recently when posting from my Solved That! website I experienced a problem that has randomly appeared previously. The problem is when posting the WordPress post to Facebook the post on the Facebook website has no picture or worse the wrong picture. The wrong picture can be from another post or worse an advertisement. This is annoying and embarrassing.

Yesterday I set out to find out what exactly the problem is between WordPress and Facebook. Fortunately Facebook offers a tool called the open graph object debugger tool that by entering the URL of the post in the open graph object debugger tool you can see the data Facebook “scraped” for the post. While that sounds complicated and technical it’s actually pretty straight forward once you stare at it a bit. By running the debugger I saw the problem right away, a canonical URL set in the Yoast SEO plugin.The way I determined this was my problem I saw the canonical URL and an image being used at that canonical URL. *Tip* look for a picture file extension like .jpg, .gif or .png.

What is this Yoast plugin I speak of? Yoast is a very powerful plugin for helping with SEO and I use it at my biggest websites. Yoast allows for controlling what exactly gets shared to social media but that was not the problem. A setting in Yoast allows users to specify a canonical page for a post. This tells search engines that the current post is related to a more important post or page. In my case Facebook was scraping a random picture from the canonical page I manually specified.

Yoast SEO Users – Fixing the Wrong Picture Being Posted to Facebook from WordPress

WordPress Yoast Wrong Facebook Picture

Fixing the wrong picture being posted to Facebook from WordPress is easy if your using Yoast SEO.

  1. Go to your WordPress post and temporarily remove the manual canonical url. Update your post
  2. Open the Facebook Open Graph Object Debugger and insert your post url. Click the Button “Fetch New Scrape Information”
  3. Visit Facebook and verify your post now has the correct picture specified in your WordPress post
  4. Return to WordPress and open your post and restore the manual canonical url. Update your post.

It’s that easy – When I get a chance I will manually recreate this problem to get pictures of the relevant screens.

If your Facebook post is missing a picture and the above didn’t work for you try a larger picture

Leave a Reply

%d bloggers like this: