How To Insert Custom Image Thumbnail on Facebook Link Sharing

If you want to have a custom image showing besides the link shared on Facebook, you can do it by adding a simple piece of code in your page’s header section. Facebook link sharing is one of the best way to spread your links on most powerful social community platform. You should be careful while sharing links on Facebook as that link may become a branding initiative from your side. In that case, that link should appear perfectly on other’s home page as well.

Whenever we share a link on Facebook, it actually try to retrieve some images from that particular page and show you the option to choose an image as thumbnail or select “No thumbnail”. What if the options shown by the Facebook link sharing tool is not having the proper image thumbnail? In that case you can apply the changes below to have the custom image thumbnail besides the link on Facebook.

You may also like: How To Add Blog Feed On Facebook To Share Latest Post Over There

According to the Facebook Share Documentation, Facebook takes the image provided with tag rel=”image_src” in the header section that will definitely considered in the thumbnail options on link sharing. For example, if you want to have your blog’s logo in link shared as your homepage’s URL then add the below mentioned piece of code to have logo as thumbnail in Facebook,

I added below piece of code in HEAD section of my blog i.e. header.php below wp_head,

Now I am getting an options as my blog’s logo on any link shared on Facebook. I tried to share a post from my blog to facebook using Sexybookmark plugin, See the output as below:

Thumbnail on facebook Share

Please note that the piece of code is working properly in IE8 but still there is some issue with Firefox and Chrome browser. I tried on IE 8 and it worked fine for me.

Related: Embed HTML Code On Facebook Profile To Spread Your Social And Blog Links

Sanjeev Mishra is a professional blogger and an Internet Marketing Consultant based in India. He has built the Internet Techies to provide you updates in technology and web application area.
  • Quantum

    Awesome, a new post about this. I just searched over 20 sites and couldn’t find the solution to my problem.

    I’ve figured out this line of code, now I have another question. I am posting news posts and I’m using facebook fan page to do so. Now when I post a new post, it’s always the same logo that comes up over and over. How can I get it to use that picture (logo) or one of the images from the news article?

    Thanks in advance.

  • Thanks, this helped alot

  • Mike

    Marvellous solution! Thank you so much for sharing.

  • I have the exact same problem told by Quantum. How can I use the image from the post, not the blog logo? Do we have to add some code at the image?


  • It’s weird, sometimes Facebook gives me the option of displaying the thumbnail, or not, and other times it will only post the link as is with no image. Frustrating!

  • This didnt work for me. This is so frustrating. It still grabs a image from the sidebar. Also when I put in the share button for post, it doesnt grab the content. urghh!

  • Suede

    This DOES NOT WORK at all

  • Mike

    It doesn’t say so on the Facebook doc page for this feature, but you also need to make sure you are setting meta tags for title and description – those are required for the image_src to get picked up and used.

  • great, works fine in Firefox for me.

    But the thing is, I would like if facebook would actually take the picture from the blog-post instead of the logo from the blog. Any idea how I have to code my images in my article?

  • Hi there.
    My thumbnails to links to posts on my blog were working fine and then one day (and this has happened before, it just fixed itself somehow) when I tried to post a link, it stopped scanning for thumbnails…or maybe it scanned and couldn’t find. Do you know what potentially could be the problem. Is it some change that I made that caused this? Any info you could provide would be most helpful…it’s annoying the crap out of me.

  • I tried above code to displaying the thumbnail image,but it is not dispalyin any thumbnail image to share.please give some suggestions.
    Thanks in advance.

  • Please refer this post on SWS, there are some new changes in the code. This works, I have tried that myself.

  • Nice comment J
    you could try if you want more facebook fans. I’ve tried them and they do response fast… true reward

  • I figured it out! If u want to have fb scan ur blogpost for thumbnails, copy the link and leave out the last part of the link (/#content). I did this and it was back to normal and was scanning the blogpost for thumbnail images.

  • Strange, I didn’t change anything, but now, Facebook recognizes my pics in my post.

  • Brian

    My problem, for wordpress, is that it picks up images from within a page but not from within a post!

  • It did not work for me,I don’t know what is the problem?

  • Thanks, works perfectly for me.

  • Rohan

    how to post content image and if content image not found send logo in fb share

  • hi, where is this header section in tumblr?? thanks