Jump to main content

Formats for open graph images

Open graph specifies the og:image meta tag which can be used to set an image that is displayed when a website is shared on social media.
The problem is to know which format and size the image should have. Each social media platform has their display of shared web pages.

Here is what the services recommends (as of 11 Feb 2020):

ServiceRecommendationsMax size
Facebookleast 1200 x 630 px8 mb
Twittermin 300 x 157 px, max 4096 x 4096 px5 mb
LinkedInmin 1200 x 627 px5 mb

The problem is when it comes to how the services renders the og:image.
I tested to measure the aspect ratio for some services and here are my results:

ServiceAspect ratio
Facebook1.93 : 1
Twitter1 : 1
LinkedIn1.91 : 1
Microsoft Teams4 : 3

The solution for creating an og:image that looks good across different social medias is to go with a square image of at least 1200x1200 px.
Then to make sure the center of the image holds the most important information (so it doesn't matter that much when the top and bottom becomes cropped away). Example of how an og:image could look with highlights of the areas that might be cropped away

Below are some examples of how whatabout.dev looks like when shared on different social medias.
(The web is fast paced and these example screenshots might not be accurate even tomorrow, but the main idea with a square image will still hold for the future).

Whatabout.dev when shared on Facebook is displayed with an rectangular/wide screen og:image

Whatabout.dev when shared on Twitter is displayed with an square og:image

Whatabout.dev when shared on LinkedIn is displayed with an rectangular/wide screen og:image

Whatabout.dev when shared on Microsoft Teams is displayed with an rectangular/4:3 aspect ration og:image

Read more / sources: