2

My question is related to this one, this one, and this one, but completely different. The URL http://ogp.me/ lists the following example, where multiple images are defined within a single page:

<meta property="og:image" content="http://example.com/rock.jpg" />
<meta property="og:image:width" content="300" />
<meta property="og:image:height" content="300" />
<meta property="og:image" content="http://example.com/rock2.jpg" />
<meta property="og:image" content="http://example.com/rock3.jpg" />
<meta property="og:image:height" content="1000" />

However, the site does not say how these multiple images are used. I was thinking that perhaps Facebook scrapes all of the images specified with the og:image property and displays the one which best matches the resolution of the browsing device. But I'm not sure of this, and need confirmation.

If I include a 315x315 PNG image and a larger 1200x630 image, so that one can be used as a small image with the text corresponding to the image displayed by Facebook on its right-hand-side, and the other one is a full-size image occupying a rectangular rather than square area with the text described on the site below it, then how does Facebook decide whether to use one image or the other? (Personally, I have a square logo to display, so the smaller image might be best, with the text corresponding to the logo on the right, but I'm not sure whether to include just one of these two images or both?)

Thank you for your answers!!!

Community
  • 1
  • 1
John Sonderson
  • 3,238
  • 6
  • 31
  • 45

1 Answers1

3

Typically multiple OG:image tags allows the user to choose which image they want to use for their post depending on the platform that is reading the OG tag. IE facebook or linkedin.

Mark Hart
  • 334
  • 1
  • 3
  • 12
  • Do all of Facebook, Twitter, LinkedIn, Google+, and Pinterest support this functionality? Also, why did the open graph people decide to include the functionality you describe (that of allowing the user to select the image to share during posting)? Why is this desirable? Thanks. – John Sonderson Jan 23 '15 at 20:50
  • Also, how do I know which image will be used as the default? – John Sonderson Jan 23 '15 at 20:55
  • It's not working for me. I've included both images. Facebook just took the larger image and cropped it to the dimensions of the smaller image, despite the fact that my HTML code is correct. :-( – John Sonderson Jan 23 '15 at 21:18