Sekrab Garage

Shareable links

Making your content shareable on LinkedIn with the right image

Tip March 11, 21
Subscribe to Sekrab Parts newsletter.

To make content shared on social media, you need SSR (server side rendering) to generate the meta tags at least. The following are the minimum meta tags needed for all social media:

<meta property="og:title" content="Title" />
<meta property="og:url" content="FULLY QUALIFIED URL" />
<meta property="og:image" content="IMAGE FULLY QUALIFID URL" />

LinkedIn however, have specs for the image stated on their help file: Making Your Website Shareable on LinkedIn:

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

The one thing they forgot to mention was: do not add querystring to the url of the image. The technical issue behind it to me is unknown, but when I inserted the following valid url, it never picked up:

<meta property="og:image" content="https://cdn.sanity.io/images/96ughm6r/sekrabbin/c05cab689bdbf2f7bedf1e78eb56ff568875f443-2048x1152.jpg?w=1300&fm=webp&fit=max&auto=format" />

Removing the extra querystring params, worked fine.