Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LinkedIn not picking image specified by og:image

DEMO URL - http://maz.node1357.speedyrails.net/webreader/803

The page has open graph tags where the open graph image is served though HTTP from S3 is of 240px width and 320px height.

  <meta property="og:url" content="http://maz.node1357.speedyrails.net/webreader/803">
  <meta property="og:title" content="sharetest_4">
  <meta property="og:site_name" content="MAZ">
  <meta property="og:description" content="test pdf 10 page">
  <meta property="og:image" content="http://s3.amazonaws.com/maz_staging2/staging2env1/issues/00022/webreader/thumbs/[email protected]" />

Why does the Image Preview switcher appear here ? The first image seems to be the one specified by the og:image tag, but the second image never seems to load although there are many images in the page which are of bigger sizes than the ones specified by Linkedin.

I checked some other websites. Linkedin Sharing from this post on Techcrunch shows no switcher - CLICK HERE

But sharing from this one does - CLICK HERE

Both of these URL have images of width=680px and height > 300px. Any guidelines on how the image fetching from open graph tags on Linkedin work ?

like image 889
Alok Swain Avatar asked Sep 25 '14 12:09

Alok Swain


1 Answers

Per the LinkedIn Developer Reference, you need the Open Graph namespace in the html tag.

<html prefix="og: http://ogp.me/ns#">
<head>
  <meta property="og:title" content="My Shared Article Title" />
  <meta property="og:description" content="Description of shared article" />
  <meta property="og:url" content="http://example.com/my_article.html" />
  <meta property="og:image" content="http://example.com/foo.jpg" />
</head>
<body>
   …
</body>
</html>
like image 171
Zack Avatar answered Sep 20 '22 16:09

Zack