# og:image Meta Tag: Syntax, Sizes and How Sites Use It

> og:image syntax and image properties, the size rules Facebook and LinkedIn document, and how Google uses og:image for preview images.

The `og:image` meta tag gives the URL of the image that represents a page when someone shares a link to it. Facebook, LinkedIn and Google document how they use it. Add one relevant image of at least 1200 by 630 pixels, with its width, height and alt text.

## Syntax

```html

```

`og:image` is one of the four required properties of the [Open Graph protocol](https://ogp.me/). The other three are `og:title`, `og:type` and `og:url`. The [Open Graph meta tags guide](/html-tags/open-graph-meta-tags/) explains them. Open Graph tags use the `property` attribute, not `name`.

## Image properties

The protocol defines these structured properties for an image. Put them after the `og:image` tag that they describe.

| Property | Value |
|---|---|
| `og:image:url` | Same as `og:image` |
| `og:image:secure_url` | Another URL to use if the page needs HTTPS |
| `og:image:type` | MIME type, for example `image/png` |
| `og:image:width` | Width in pixels |
| `og:image:height` | Height in pixels |
| `og:image:alt` | A description of what is in the image, not a caption |

The protocol asks for `og:image:alt` on every page that has `og:image`. If you add more than one image, repeat the `og:image` tag. Each new `og:image` tag starts a new group of properties. If tags conflict, the first one in the page wins.

## Facebook requirements

Meta gives these numbers in its [image guide for sharing](https://developers.facebook.com/docs/sharing/webmasters/images/):

1. The minimum size is 200 by 200 pixels.
2. For high resolution screens, use at least 1200 by 630 pixels.
3. Keep the aspect ratio close to 1.91:1, so the image shows in Feed without cropping.
4. The file must not be larger than 8 MB.

Meta says that `og:image:width` and `og:image:height` let its crawler show the image the first time that someone shares the page. Meta caches images by URL. If you replace an image, give the new file a new URL. Do not delete the old image, because older posts can still refer to it. The [Facebook crawler](/ai-crawler-bot/facebookexternalhit/) reads the tags.

## LinkedIn requirements

LinkedIn's [help page on shared content](https://www.linkedin.com/help/linkedin/answer/a521928) lists `og:image` as a required tag. It gives a minimum size of 1200 by 627 pixels, a 1.91:1 ratio and a maximum file size of 5 MB.

## How Google uses og:image

Google says that its choice of a preview image is automated. You can give a preferred image with `og:image` or with schema.org markup ([Google image best practices](https://developers.google.com/search/docs/appearance/google-images)). Google gives two examples of where the image can appear: the image of a text result in Search, and the preview image in Discover. Google gives these rules for the preferred image:

1. Choose an image that is relevant and representative of the page.
2. Do not use a generic image, such as your site logo, or an image with text.
3. Do not use an extreme aspect ratio.
4. Use a high resolution if you can.

For large images in [Google Discover](https://developers.google.com/search/docs/appearance/google-discover), Google asks for images at least 1200 pixels wide and the `max-image-preview:large` setting. That setting is a rule of the [robots meta tag](/html-tags/meta-robots/).

## What og:image does not do

The `og:image` tag does not do these things:

1. It does not make Google show your image. Google says only that the tag can influence its choice.
2. It does not update old previews. Facebook keeps the cached image until you use a new image URL. You can ask Facebook to read the page again in the [Sharing Debugger](https://developers.facebook.com/tools/debug/).
3. It does not set the image on X when X finds its own `twitter:image` tag. Read the [Twitter card meta tags guide](/html-tags/twitter-card-meta-tags/).

## Test the tag

Paste the page URL into the Facebook [Sharing Debugger](https://developers.facebook.com/tools/debug/). It shows the tags that the crawler reads, with errors and warnings. LinkedIn has a similar tool, the [Post Inspector](https://www.linkedin.com/post-inspector/).

---

[View the canonical page](https://aichatwatch.com/html-tags/og-image/) · [Browse llms.txt](https://aichatwatch.com/llms.txt)
