Share Your Thoughts

Your email address will not be published.

36 thoughts on “Display correct thumbnail on facebook share”

  1. Caroline says:

    I tried installing the plugin, and looks like I’m still not getting the post thumbnail – users still have an option of some of the images in the post. Am I doing something wrong?

  2. zinat says:

    wow wow wow.your code worked instantly.loving it.thx a million for the info.u rock admin

  3. TrendyWp says:

    Nice share, I did like you said and it works very well

  4. Rima says:

    Thank you so much!! I have been trying to figure this out.

  5. Lineando says:

    Works fine, great!

  6. This works great, thanks!

  7. Borat says:

    I don’t have any pictures in my posts, just videos…how do I get it to display a thumb of the video when I share to facebook?

    1. Matt Say says:

      You can take snapshots of videos and add them as featured image yourself, or you can use a php plugin or script to extract video thumbnails and add them automatically to your posts. Please note that not all video providers supply video thumbnails. Youtube video thumbnails are accessible via API though.

  8. I didn’t work for me on WordPress 3.3.1 with code edit and plugin :(

    any suggest?

    1. Matt Say says:

      You can use facebook URL linter (debugger) to debug your open graph issues. Or better use my Facebook Meta Tags plugin.

  9. saif khan says:

    where can i find that header file??

    1. Matt Say says:

      in your theme folder: wp-content/themes/your-theme-name

  10. centreblog says:

    Thanks for that! works a treat. I spent 2 days trying to fix this problem. All the other so-called fixes did nothing. This is the only thing that works. And by the way there is a hell of a lot of other people with the same issue out there!

  11. Laura says:

    Thank you! Thank you! Thank you! I have been looking for a solution all weekend and couldn’t get anything to work that was this simple!

  12. Rehan Khan says:

    it worked for me thanks for sharing this meta tag fix script

  13. Shawn Keene says:

    Thanks for this post! I was going through the WordPress API site and was getting close, but your code was sure easier, I appreciate it. Now I’m trying to set an “else” case to use a default icon in case a thumbnail isn’t found (not all my posts have them).

  14. Laura says:

    Just used those lines for my site and they worked – thanks.

  15. Tomas says:

    those lines worked perfectly! Thanks:)

  16. Thanx man. Your plugin is light, but worked like a gem. Thanks alot :)

  17. Ernest says:

    Thank you very much! This code definately helped out in the facebook sharing issue I had.

  18. Angel says:

    whoa, it worked! :-) thanks for making this post!

  19. Ludovic Barrois says:

    I have been trying to fix this fo hours, trying pretty half a dozen of plugins with no result.
    Since my posts only display a large video, but have a featured image for the index, I could not make it work.


  20. nico says:

    Does facebook have image dimension restriction? Coz sometimes my thumbnail not shown.

  21. Fman says:

    Hey dude, nice trick, but i got a problem, when i click the share button on any post of my blog , it show my seo meta description, i didnot want this actually, i want make sure facebook show only description on post, not my seo description…. how to fix this?

    btw,u can try see my prob at here, ->

    try click share button at any post, it show seo meta description, not a post description…=.=’

    1. shailan says:

      Facebook changed metatags now. I just updated the post. Use those new versions & it should do.

  22. Renji says:

    Will this work if it’s an external image?

    1. shailan says:

      Those meta tags are changed. Please refer to new open graph meta tags documentation.

  23. Linda says:

    Hi Shailan,

    For this article page,, my ShareThis via Facebook cannot display the thumbnail. Will you be able to help?

    Thank you.

  24. Kris says:

    Worked for me on the first try, I knew there had to be an easy way to do this. Thanks for sharing the solution.

    1. shailan says:

      Thanks. I’m glad it worked.

  25. marvzz says:

    if i have multiple image in a webpage, how can I force the Sharer to use only one thumbnail, meaning, there will be no option to select other thumbnails?

    1. shailan says:

      Facebook looks for other images in your page and allows users to use them too.
      One trick would be using other images as background in your CSS file.
      Facebook doesn’t use css files while searching images.

      1. marvzz says:

        Thanks for your reply, but that would seem impractical for our usage as we are using animated gifs on some of our images.

        Thanks anyway :) i’m looking into using the stream.publish

  26. Irene Shih says:

    this is very useful!thank you~~~