How to set priority order to Open Graph images for links that are inserted in comments. (Not sharing or wall posts.)

qcole picture qcole · Dec 3, 2011 · Viewed 12.2k times · Source

When pasting a link to a page within a comment, not directly as a wall post, Facebook defaults to choosing a thumbnail image, without users being able to choose the relevant thumbnail. Is it possible to set or determine priority for og:image tags on pages with multiple og:image tags? There doesn't seem to be any logical way to determine why FB is choosing any specific image. The image they are choosing isn't the first, or last image, by code order or alphabetized by name, and doesn't really follow any reasonable reason that I can figure out. Does anyone know how to set which image is chosen on comments?

I already know how to do this for wall posts, status updates, and sharing links, but you do not have the thumbnail chooser when posting links within comments, so being able to prioritize the order of multiple images would be ideal.

Answer

Anh Nguyen picture Anh Nguyen · Oct 4, 2012

I have just found out that Facebook will try to display best images (higher resolution) first. For example, if I have 3 meta tags in following order:

<meta content='http://mysite/low-res.jpg' property='og:image'>
<meta content='http://mysite/med-res.jpg' property='og:image'>
<meta content='http://mysite/hi-res.jpg'  property='og:image'>

then the order of displaying on Facebook dialog will be:

hi-res.jpg
med-res.jpg
low-res.jpg

I hope it will help.