Linkedin|Open Graph|Social sharing

How to successfully fix the OG image for Linkedin

The social share image works on all other social medias besides Linkedin? Here's what you need to do.

Last updated on

|
--- views

You have included all the necessary tags needed for your OG social image to work. And in fact, it works fine on Facebook and Twitter. But not on Linkedin. Let's go over several common ways you can fix it for your website.

Utilise Linkedin's post inspector

Head over Linkedin's Post inspector and paste the URL of the problematic page. Does the image show correctly? If it does, it means that it was a cache issue. If not, continue reading this article.

Linkedin's image requirements

Linkedin has image requirements when sharing a webpage.

Make sure to that your OG image is within those limits:

  • Max file size: 5 MB
  • Minimum image dimensions: 1200 (w) x 627 (h) pixels
  • Recommended ratio: 1.91:1

The image filename shouldn't have any spaces

This is not documented anywhere on the Linkedin website, but from personal experience this is 100% a factor.

Make sure that your image filename doesn't have any spaces. It would work 90% of the time, but the other 10% will leave you wondering what is going on.

  • ✅ "og_image.png"
  • ❌ "hey this is my social sharing image.png"

Place your OG tags as early as possible within the head tag

This might be a problem if you are using Gatsby.

Crawlers for Facebook and Linkedin might stop trying to find the og image tag since it's too far into the source code. This is since they have a certain amount of KB of data they can crawl before they give up.

This means that if you have a big CSS file which comes before your OG tags, the crawler will never read it even though it is in the head tag.

Linkedin prefers .jpg files

This is just a theory, but it seems that Linkedin likes .jpg more than .png

This has been observed by other developers as well.

Image filename is too long

Tough luck if you have reached to this point and your Linkedin social image is still not working. For the really desperate, here's another theory - the image filename is too long

All the technical SEO you'd need within our dashboard - just for

SEO component, structured data, favicon setup, sitemap setup and much more in your framework and language.

Learn more

Lifetime access for (early bird price)

A gif showcasing SEO component's dashboard