Fixing the Image Facebook uses when the page is shared

Fixing the Image Facebook uses when the page is shared

Recently a client of mine with a WordPress site said that the image Facebook uses when the page is shared is not the image that she wanted to have show up. Sure enough, when I checked I saw that an image from her Pinterest page was showing up instead of her company logo!

When determining an image to use, Facebook looks for certain meta tags in the <head> section of the page, specifically these:

<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/> <meta property="og:image:secure_url" content="https://secure.example.com/ogp.jpg" />

If these tags are not present, it will look for the older ‘link rel=’ method of specifying an image. If neither are there, Facebook looks at the content of your page for images that meet its criteria, such as size, aspect ratio and PNG, JPEG or GIF format.

Sometimes, SEO plugins may override the tags. Since this site uses WordPress SEO by Yoast, I edited the page, and under the Social tab I specified the image that my client wants to use.

Next, I went to the Facebook Debugger: https://developers.facebook.com/tools/debug/, entered the site URL, and clicked ‘Fetch new  scrape information’.  This confirmed the og:image.

No Comments

Post a Comment