LinkedIn og:image preferences

(John Cory) #1

Is anyone familiar with the dark art of getting WordPress featured images to show up in LinkedIn shares of a given WordPress page, post or custom post?

A few potential variables I’ve run into:

  • Image size – Some people say it has to be larger than X or a specific dimension X:Y, at least for Facebook
  • Meta tagging - Some people say you have to refer to the image with an og:image meta
  • Image Attachment - Some people say it has to be a “Featured Image” … but how does LinkedIn tell the difference?
  • Cache wah-wah – Some people say LinkedIn has a 7-day cache you have to wait for (or override?)

Pretty niche topic but thought I would ask. We’re seeing LinkedIn able to pull images for one custom post type, options for another and nothing at all for yet another.


(Leland Fiegel) #2

Facebook recommends 1200x630 for OpenGraph images. I usually just go with this wherever, although sometimes you need a slight adjustment for Twitter.

Yes, this is what you’re supposed to do. Although social networks understand that not every webmaster uses them, so sometimes they just pick a random image from the page and utilize it in the same way.

Twitter has their own tag called twitter:image which can come in handy if images look weird on Twitter only, but I don’t think LinkedIn has an equivalent like linkedin:image, it just uses og:image.

This isn’t entirely accurate. It’s possible with a plugin to designate the featured image as the OpenGraph image, but it doesn’t work like magic. Without a plugin, as you said, LinkedIn would have no clue whether your featured image was supposed to be the OpenGraph image. It may use it, just as a coincidence, if it’s displayed on the page though.

According to this page, this is true.

The first time that LinkedIn’s crawlers visit a webpage when asked to share content via a URL, the data it finds (Open Graph values or our own analysis) will be cached for a period of approximately 7 days.

This means that if you subsequently change the article’s description, upload a new image, fix a typo in the title, etc., you will not see the change represented during any subsequent attempts to share the page until the cache has expired and the crawler is forced to revisit the page to retrieve fresh content.

It’s a little frustrating because Facebook and Twitter both have tools where you can force a cache refresh for a particular URL at any time, and 7 days can be a long time to wait if a mistake is made.