How to specify an image to appear in facebook link to your site?
31,123
Solution 1
<link rel="image_src" href="/path/to/image.jpg" / >
Solution 2
There is also a new format
<head>
<meta property='og:image' content='http://yoursite.com/INSERT_YOUR_IMAGE.jpg'/>
</head>
More details here and here. Also the facebook share docs as posted by eliah on this page.
Author by
Jason Kester
Updated on October 19, 2020Comments
-
Jason Kester over 3 years
Silly question: Seeing as how Facebook will automatically sniff out images from a website when somebody links to it, is there any way to give Facebook a hint as to which image you'd prefer be used from your site? Currently, the logo image that I'd like to appear doesn't even show up in the list that Facebook generates.
Any ideas?
-
nealmcb over 8 yearsBe careful about the details, e.g. it doesn't seem to like relative URLs. You can check your metadata via Facebook's Debug page: developers.facebook.com/tools/debug/og/object