Skip to content

Link previews

Open Graph image: what og:image does and how to choose one

By Hannah Voss, Editor · Reviewed September 2026 · Updated · 7 min read

Quick answer

An Open Graph image is the picture named in your page's og:image tag, one of the four properties the Open Graph protocol requires on every page. Networks and chat apps use it as the image in a link preview. Six optional structured properties describe it: url, secure_url, type, width, height and alt.

A cut-paper link preview card with a grey landscape panel, two blank text bars and a small embossed seal in one corner

What is an Open Graph image?

It is the image a link preview uses. The Open Graph protocol lists four required properties for every page, og:title, og:type, og:image and og:url, and defines og:image as an image URL which should represent your object within the graph. When someone shares the page, the app that builds the card fetches that URL and draws the picture at the top or side of the card.

Facebook created the protocol, but the tag is read well beyond it. Slack's unfurling documentation says it looks for common Open Graph and X Card metadata, and WhatsApp's link preview guide names og:image as the thumbnail for its previews. One good image therefore does most of the work on every network. The wider context is in our link preview and Open Graph guides.

<meta property="og:image" content="https://example.com/wp-content/uploads/2026/11/town-clock-share.jpg" />

The structured properties of og:image

The spec lets you attach extra detail to the image with structured properties, written as og:image: plus a name. All six are optional.

PropertyWhat the spec saysWhen to use it
og:image:urlIdentical to og:imageRarely; og:image alone is enough
og:image:secure_urlAn alternate URL to use if the webpage requires HTTPSOnly if og:image is still http; better to serve og:image over https
og:image:typeA MIME type for the imageimage/jpeg, image/png or image/webp, matching the real file
og:image:widthThe number of pixels wideAlways, with the file's real width
og:image:heightThe number of pixels highAlways, with the file's real height
og:image:altA description of what is in the image, not a captionAlways when you set og:image; the spec says you should
The og:image root tag followed by its structured properties01og:imagethe file URL02og:image:typeMIME type03og:image:widthpixels wide04og:image:heightpixels high05og:image:altwhat it shows
Root tag first, then its properties. The order matters when a page has more than one image.

A full block for one image looks like this. Width and height must describe the actual file; the right numbers for a share image are on our OG image dimensions page, so they are not repeated here.

<meta property="og:image" content="https://example.com/wp-content/uploads/2026/11/town-clock-share.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="{width}" />
<meta property="og:image:height" content="{height}" />
<meta property="og:image:alt" content="The town hall clock face at dusk, hands at ten past six" />

What happens with more than one og:image?

The spec allows arrays: repeat the tag and you declare several images. It adds two rules. The first tag, from top to bottom, is given preference during conflicts. Structured properties belong to the root tag declared just before them, and a new og:image line starts a new image.

That second rule catches people out. In the spec's own example, a width and height after the first image apply only to it; a later image with no properties has unspecified dimensions. Put each image's properties straight after its own og:image line.

In practice most cards show one picture, and the first wins. If your theme prints a logo before your SEO plugin prints the featured image, the logo is what people see. Duplicate tags are the most common cause covered in fixing a wrong Facebook share image.

How do I choose an Open Graph image?

The image is a promise about the page. Pick it the way you would pick a magazine cover for one article, not a site-wide banner.

  • One subject, centred. Cards are cropped to different shapes on different apps. A single clear subject in the middle survives most crops.
  • Specific to the page. A generic site logo on every post makes every share look the same in a feed. Use the featured image or a custom share image per post.
  • Readable at thumbnail size. Many chat apps show the image small. Fine detail and small text disappear.
  • Honest. The picture should show what the page is about. If the image is generated or heavily edited, say so; our guide on labelling generated images in previews covers how.
  • Yours to use. The image will be copied onto other services' servers when it is shared. Use pictures you have the rights to publish that way.

Designing a share image that holds up

If you make a dedicated share image rather than reusing a photo, keep it simple. A headline in large type, a strong photo or illustration, your site name small in a corner. Keep text away from the edges, since some apps crop to a square or a wider strip. Do not repeat the page title word for word; the card already shows it underneath.

Write og:image:alt as a plain description of what is in the picture, as the spec asks, not a slogan. Describe the scene, the people and any text in the picture, in one sentence.

Set an Open Graph image in WordPress

The steps below use the built-in media library to get a clean image URL. Where you paste it depends on how your site prints tags; the WordPress OG tag setup guide explains the options and why only one plugin should do it.

  1. Open the media library

    In the WordPress dashboard, go to Media, then Library.

  2. Upload or pick the image

    Select Add New Media File and upload your share image, or click an existing image to open Attachment details.

  3. Read the dimensions

    Attachment details shows the file name, type and dimensions. Note the width and height for the og:image:width and og:image:height tags.

  4. Fill in the alt text

    Type a description of what the picture shows in the Alternative Text field. Reuse it for og:image:alt.

  5. Copy the file URL

    Click Copy URL to clipboard. The address starts with https and ends with the file name.

  6. Set it as the share image

    Paste the URL into your SEO plugin's social image field for the post, or set the image as the featured image if your plugin uses that.

  7. Check the output

    View the published page's source and search for og:image to confirm one tag with the new URL.

Before publishing, you can paste the draft's HTML into our tag-reading preview checker, which runs entirely in your browser.

What goes wrong

  • A relative URL. /uploads/share.jpg works on your site and nowhere else. WhatsApp's guide asks for an absolute URL; give one everywhere.
  • Properties before the root. og:image:width above og:image attaches to nothing.
  • Width and height that do not match the file. They are meant to describe the file. Give the real values or leave them out.
  • A logo printed first. The first og:image wins conflicts, so a theme's default tag can beat your featured image.
  • Overwriting the file under the same name. Apps that cache by URL keep the old picture. Upload the new version with a new name.
  • Assuming other formats read og:image. Microsoft Teams, for example, documents schema.org JSON-LD for its richer previews, where the picture is an image property, as its micro-capability guide shows.

Check it worked

  • Page source shows one og:image, an absolute https URL that opens the picture in a private window.
  • og:image:type, og:image:width and og:image:height match the real file.
  • og:image:alt describes the picture in plain words.
  • The properties sit directly after their og:image line.
  • A test message to yourself in Slack or WhatsApp shows the image you chose, not a logo.

Sources

Questions

What is an Open Graph image?

It is the image named in a page's og:image meta tag. The Open Graph protocol makes it one of four required properties, and social networks and chat apps use it as the picture in link previews when the page is shared.

What is og:image:secure_url?

The Open Graph spec defines it as an alternate URL to use if the webpage requires HTTPS. If your og:image already uses an https address, you do not need it; serving the image over https in og:image is the simpler fix.

Do I need og:image:alt?

Yes, if you set an og:image. The spec says a page that specifies og:image should specify og:image:alt, and describes it as a description of what is in the image, not a caption. Write it plainly.

Can a page have more than one Open Graph image?

Yes. Repeat the og:image tag to declare several. The spec says the first one is preferred in conflicts, and each image's width, height and alt must follow its own og:image line, so put the image you want shown first.

What size should an Open Graph image be?

Use the dimensions from our OG image size guide and keep the subject in the centre, since apps crop differently. Whatever size you choose, set og:image:width and og:image:height to the real values of the file.

Share this guide

Hannah Voss, Editor. Checks every guide against a working WordPress install and the networks' current documentation. Last reviewed September 2026.

  1. Open Graph image size: 1200 by 630 and the safe zoneThe right Open Graph image size is 1200 by 630 pixels at a 1.91:1 ratio. Minimums, file limits, formats, and a centre safe zone for square crops.6 min read
  2. Facebook showing the wrong image or share textFix Facebook showing the wrong image or text when you share a WordPress post: duplicate tags, small images, cache, blocked crawlers, and the Sharing Debugger.7 min read
  3. Adding Open Graph tags in WordPressAdd Open Graph tags to WordPress with an SEO plugin or theme code: the four required tags, image tags, per-post overrides, and how to avoid duplicate tags.7 min read
  4. Labelling AI-generated images in link previewsHow to label an AI-generated og:image honestly: captions, alt text, digital source type metadata and what networks show when the card is shared.6 min read