Warning Image

Missing og:image Dimensions — Why You Should Specify Width and Height

Specifying og:image:width and og:image:height helps platforms render your image correctly.

What are og:image dimensions?

The og:image:width and og:image:height meta tags tell social platforms the exact size of your Open Graph image before they download it. This allows them to render the preview layout correctly without waiting for the image to load.

Why does this matter?

Without explicit dimensions:

  • Layout shift — The preview area may jump or resize as the image loads
  • Slower rendering — Platforms must download the image first to determine its size
  • Incorrect display — Some platforms may crop or scale the image poorly without knowing its aspect ratio
  • Caching issues — Facebook's crawler may time out before fetching the image dimensions

How to fix it

Add width and height tags alongside your og:image:

<meta property="og:image" content="https://yoursite.com/og-image.jpg" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />

Recommended dimensions

The universally recommended OG image size is 1200 x 630 pixels (1.91:1 aspect ratio). This works well across all major platforms:

Platform Recommended Minimum
Facebook 1200x630 600x315
Twitter/X 1200x628 300x157
LinkedIn 1200x627 200x200
Discord 1200x630 256x256
WhatsApp 1200x630 300x200

Framework-specific implementation

Next.js (App Router):

export const metadata = {
  openGraph: {
    images: [{
      url: 'https://yoursite.com/og-image.jpg',
      width: 1200,
      height: 630,
    }],
  },
}

HTML:

<meta property="og:image" content="https://yoursite.com/og-image.jpg" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />

Related articles