Fix Wrong Image Shown In Facebook Share – Reset og:image Cache

April 9, 2017

450 views

2 min read

Learn how to clear the facebook og:image cache to fix wrong images appearing in facebook shares.

YOU know how important it is to share your website on social medias. With the addition of the Twitter card, Facebook Open Graph, Pinterest Rich Pins and more, the user engagement on links has increased over time. In WordPress, the Yoast SEO plugin has an inbuilt rich card editor, so you could edit the card and see how it looks on facebook or twitter.

Last day, I added some new open graph images to some previously published posts but I came to know that the changes were not reflected in the rich cards when I tested it on facebook. At first, I had the impression that the plugin had not made the change in the code, so I went inspecting the source code of the post. I was surprised to see that the image URL has indeed changed. Then I began researching the issue and found out that facebook caches the og:image property. So today I am gonna show you how you can fix wrong image shown in facebook share.

The output list contained the VM text so I couldn’t copy the code directly to the batch invalidator. This time sublime came to rescue me. I could simply use the find and replace feature to delete that piece of text.