Facebook share doesn't show images

28,695

Solution 1

Use Open Graph protocol

<meta property="og:title" content="The Rock"/>
<meta property="og:type" content="movie"/>
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
<meta property="og:site_name" content="IMDb"/>
<meta property="fb:admins" content="USER_ID"/>
<meta property="og:description"
      content="A group of U.S. Marines, under command of
               a renegade general, take over Alcatraz and
               threaten San Francisco Bay with biological
               weapons."/>

To test each links use URL Linter


Look at this forum, most of them will ask same questions, why OG image is not working on like button. It's a bug maybe? Bug 16580

Solution 2

Facebook seems to want images that are at least 200px in both directions, whether supplied in the OG metadata, or just embedded on the page. They have updated their URL linter to show this error for the OG metadata recently. I can't find sources now, but I thought they used to have a maximum pixel dimension of less than 200px previously...

Also, I've seen problems displaying thumbnail images for Chrome on OS X, where on Windows browsers there is no problem. Really strange.

Solution 3

Are you using a public server or a local one? Facebook share doesn't show pictures if the URLs are coming from localhost.

Share:
28,695
Revenant
Author by

Revenant

Updated on May 18, 2020

Comments

  • Revenant
    Revenant about 4 years

    I code a news PHP script. End of each news I have a Facebook share button. The problem is I can't display thumbnail images with Facebook share.

    I tried Meta OG

    <link rel="image_src" href="" /> 
    

    element without any success. Interesting thing is, some of the domains which is using my news PHP Script, has no problem with it but some has.

    Domain without any problems:

    Domains with problems:

    I also tried addThis and it didn't solve the problem.

    All of the domain names above are using the same system. I thought it might be because of the system so I tried clean HTML page:

    As you can see in the last example, I used 2 different kind of sharing options. First with popup. I sent all parameters over URL but some domains display images, some don't. I also added addThis option.

    I also thought about .htaccess and cleaned everything in it since I thought .htaccess might block something. I took every step very carefully which I could think of.

    This issue started to be annoying, I would be glad if anyone could help me out.

  • Revenant
    Revenant about 13 years
    As you could see in the domain names I provided, they are not local.
  • haha
    haha about 13 years
    +1 voted your question. I have tested on my site looks like same problem. I found when my page load with Google maps the OG will not working on Facebook. Let me find the solution.
  • Revenant
    Revenant about 13 years
    Thank you, I informed my friend about the issue.
  • haha
    haha about 13 years
    Bug 16580 on Facebook
  • Revenant
    Revenant about 13 years
    Thank you very much for the information. I'm quite confused right now. What to do with this topic. Could you please edit your post for the bug info, so I can mark your answer as correct one?
  • haha
    haha about 13 years
    @Pixeler, answer edited. I have posted on their forum too :)
  • Revenant
    Revenant about 13 years
    @haha; Should I accept your answer as correct one right now? I'm quite confused. This is the only question I didn't accept any answer yet.
  • Revenant
    Revenant about 13 years
    This problem is a Facebook bug so we will have to wait till Facebook will fix the bug. Thank you for your time and concern. I will accept your answer as solution. For the people who have the same problem, I would like to inform once again so far there is no fix.