Tina Malina
Tina Malina

Reputation: 141

Facebook loads og:image, + one extra random image?

I have these og meta tags in place:

(I'm replacing the actual values with examples here, it's a client's site and I'd like to be descrete)

  <meta property="og:title" content="Article title"/>
  <meta property="og:type" content="article"/>
  <meta property="og:url" content="http://www.site.com/articles/article"/>
  <meta property="og:site_name" content="Site title"/>
  <meta property="og:description" content="Description, cca 200 characters"/>
  <meta property="og:image" content="http://www.site.com/images/thumb.jpg"/>

The thumbnail used for og:image is 300x300px.

When I run the URL through facebook's debugger (ex linter) tool, it finds no errors or warnings. It displays one og:image, the one that is defined in the meta tags, as it should.

However, when the URL is actually shared on facebook, facebook offers two thumbnails - one which is the actual og:image, and also one completely random image, which is actually part of the layout.

Sometimes it offers the og:image first, but sometimes the other one is loaded first instead. So it happens that people share the link on facebook with a random piece-of-the-layout image in it.

I can't figure this out. Why is facebook doing it? I believe I've done everything by the book? Why is it loading this one extra image? Every google search I've run on "facebook loads wrong image" and similar strings only provides obvious advice that you need to have one og:image specified - which I do!!

I thought it might be a matter of fb cache, but it loads it on every single article. I have tried changing the image file name, and even loading it from a different domain name - and changing its colour to be sure facebook is loading it from the server and not its own cache. Nothing helped, facebook seems to have taken an extreme liking to it, it just won't let go of it.

Is there any way on earth to prevent this? I'm at my wits end. Has anyone had similar problems? :(

Upvotes: 2

Views: 1547

Answers (2)

Snziv Gupta
Snziv Gupta

Reputation: 1066

One of possible reason can be size of image that you are setting in

<meta property="og:image" content="domain/images/thumb.jpg"/>

Image size of specified image in above meta data should be greater than 200*200 for facebook sharing else it takes some random image probably the last in that html.Hopefully someone can still find it useful.

Upvotes: 0

Rok Burgar
Rok Burgar

Reputation: 949

Remove the url meta tag. Looks like the metadata is not on the same page as the content. What FB crawler is doing is fetching the meta tag info from the provided url.

Upvotes: 1

Related Questions