Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

An Open Graph image is the image URL a page publishes in its og:image metadata. Social networks and other consumers read that metadata from the page’s HTML <head> and can use the referenced file when representing the page as a rich object. The Open Graph protocol defines og:image alongside og:title, og:type, and og:url as the four basic properties every object should provide.

The tag does not embed, generate, resize, or upload an image. It declares where the representative image can be fetched. Each consuming service decides whether to display it, how to crop it, and when to refresh its cached copy, so a page can look different in different previews.

What an Open Graph image actually is

Open Graph is a metadata protocol that lets a web page become a rich object in a social graph. An Open Graph image is the visual representation named by the page’s og:image property. The value is a URL, not the binary image data itself.

A crawler or sharing service requests the page, reads the metadata in the HTML head, and associates the declared URL with the page’s title, type, and canonical identifier. The service may then fetch the image and use it in a link preview or another interface. The protocol describes the declaration; it does not standardize the final preview appearance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The official protocol describes its purpose as enabling “any web page to become a rich object in a social graph.” Read the Open Graph Protocol documentation for the normative overview and the protocol source for the property definitions.

The four basic Open Graph properties

Every page object should identify four core values in its HTML head:

Property What it identifies Example value
og:title The object’s title A page title
og:type The object’s type website
og:image The URL of an image representing the object https://example.com/images/share-image.jpg
og:url The object’s canonical URL and permanent identifier in the graph https://example.com/page/

A minimal declaration looks like this:

<html prefix="og: https://ogp.me/ns#">
<head>
  <meta property="og:title" content="A page title" />
  <meta property="og:type" content="website" />
  <meta property="og:url" content="https://example.com/page/" />
  <meta property="og:image" content="https://example.com/images/share-image.jpg" />
</head>
</html>

Place these tags in the page’s <head>, not in visible page content. The prefix declaration identifies the Open Graph vocabulary; the metadata values are supplied with property and content attributes.

How a preview is produced

  1. The page publishes metadata. Your server returns HTML containing the Open Graph tags in the head.
  2. A consumer reads the head. A social platform, messaging client, search feature, or other consumer requests the page and parses the properties.
  3. The consumer resolves the image URL. It treats the og:image value as the location of the representative image and may request that file.
  4. The consumer builds its own presentation. It combines the title, URL, type, and image according to its own interface and policies. The protocol does not require identical dimensions, crops, placement, or cache behavior across services.

This separation explains why changing the HTML does not guarantee that every existing preview changes immediately: consumers control their own fetching and caching. The Open Graph specification itself does not promise a universal refresh procedure.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Optional metadata for the image

The protocol documents additional properties that describe the referenced image:

Property Purpose
og:image:secure_url A secure URL for the same image.
og:image:type The image media type, such as image/jpeg.
og:image:width The image width in pixels.
og:image:height The image height in pixels.
og:image:alt Alternative text describing what is in the image.

When a page specifies og:image, the protocol says it should also specify og:image:alt. Alt text should describe the image’s contents, rather than act as a caption or repeat the page title.

Here is the same image declaration with the documented structured properties:

<meta property="og:image" content="https://example.com/share.jpg" />
<meta property="og:image:secure_url" content="https://example.com/share.jpg" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="A blue bicycle parked beside a brick wall" />

The 1,200-by-630 values in this example demonstrate syntax only. They are not a universal requirement or a guarantee of acceptance by any particular platform. If a service has its own size, format, or file-limit rules, consult that service’s current documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Declaring more than one image

Open Graph allows an array property to have multiple values by repeating the root property. For images, repeat og:image for each candidate:

<meta property="og:image" content="https://example.com/primary.jpg" />
<meta property="og:image:alt" content="The primary illustration" />
<meta property="og:image" content="https://example.com/alternate.jpg" />
<meta property="og:image:alt" content="An alternate illustration" />

The protocol gives preference to the first value when values conflict. Keep each image’s structured properties immediately after its corresponding og:image declaration. Those width, height, type, and alt properties belong to that image until the next image root property begins. Put the image you want preferred first.

How to add an Open Graph image to a page

1. Create or select a representative file

Choose an image that accurately represents the page or object. Give it a stable, publicly reachable URL and make sure the URL points to the image file, not an HTML page that merely displays it. The protocol does not prescribe one universal size or format; check the requirements of the platforms your audience uses.

2. Add the required metadata

Insert og:title, og:type, og:url, and og:image in the returned HTML head. Use the page’s canonical URL for og:url and a matching representative image for og:image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Add image details

Add og:image:alt and, when useful, the secure URL, media type, width, and height. Keep structured properties grouped with their image root.

4. Inspect the generated source

View the page source or the server-rendered HTML and search for property="og:image". Confirm that the tag is in the head, the URL is complete, and the expected image is returned at that URL. If your site generates different HTML for bots and browsers, inspect the exact response a sharing crawler receives.

5. Check the actual consumer

Share a test URL in each service that matters to you. Compare the resulting preview with the declared title and image. Do not assume that one service’s crop, cache, or file acceptance rules apply to another.

Common implementation failures and fixes

Symptom Likely cause Fix
No image appears The page lacks og:image, the URL is wrong, or the image cannot be fetched. Verify the tag in the HTML head and open the exact image URL directly. Correct the URL or hosting response.
The wrong image appears Several image roots are present, or an older preview is being reused. Put the preferred og:image first, keep its structured properties adjacent, and retest according to the consumer’s own cache behavior.
Image details are associated with the wrong file Width, height, type, or alt tags are separated from their image root. Move each structured property immediately after the matching og:image declaration.
Alt text is unhelpful The value repeats a caption or page title instead of describing the visual content. Rewrite og:image:alt as a concise description of what the image shows.
Preview differs between services Consumers choose their own rendering, dimensions, crops, and cache policies. Validate the page on every service you support and follow each service’s current requirements.
Updated tags are not visible immediately The consumer may retain a cached fetch. Confirm that the origin HTML is updated, then use the consumer’s documented refresh or re-scrape process if one exists.

Testing the rendered page without browser automation

A screenshot is useful for checking what a human sees after the page loads, but it does not replace inspecting the HTML head. For a visual check, capture the page at a chosen viewport and compare the rendered design with the image you declared. For metadata correctness, inspect the source or response headers and verify the exact Open Graph tags.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If you need a screenshot API, ScreenshotNeo is the first option to try because it removes consent banners, popups, and chat widgets before capture, bills only clean shots, and has a $5 paid plan for 3,000 shots.

Or skip the browser setup

ScreenshotNeo can capture the rendered page with one GET request. The API supports PNG, JPEG, or WebP output, and its response identifies whether a shot was billed with X-Page-Verdict and X-Billed headers. Cookie and consent banners, newsletter popups, and chat widgets are removed before capture; bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing. An MCP server also provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

cURL

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/page/ -o og-check.webp

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com/page/"}, timeout=90)
open("og-check.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com/page/' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

See the ScreenshotNeo API documentation for request options. Every plan includes its features; you can choose full-page capture with lazy images loaded, an element by CSS selector, dark mode, device presets or a custom viewport, retina scale, custom CSS and JavaScript, click actions, hidden selectors, selector or network-idle waits, blocked ads and trackers, custom headers and cookies, timezone and geolocation, transparent backgrounds, resizing, TTL-based caching, signed links, asynchronous jobs with signed webhooks, bulk capture for up to 100 URLs per call, usage data, and an OpenAPI specification. Parameter names used by other screenshot APIs also work, which can simplify a switch.

The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; yearly billing gives two months free. Create a free ScreenshotNeo account to begin.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What Open Graph does not guarantee

  • It does not create an image from your page. You must provide the image file at the declared URL.
  • It does not force every service to show the same crop, dimensions, placement, or format.
  • It does not define one universal image size, file limit, or cache-refresh workflow for every platform.
  • It does not replace ordinary accessibility work in the page itself; og:image:alt describes the social-graph image metadata.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

FAQ

Is og:image the same as an inline image in the page?

No. It is a URL-valued declaration in the head. An inline <img> element is visible page content; og:image identifies a representative asset for consumers of the page metadata.

Which image wins when several are declared?

Open Graph permits multiple image values and gives preference to the first when values conflict. Declare the preferred image first and keep its structured properties directly after it.

Best Value
Gufacai Personalized Nail Art Tray,Custom Nail Photo Props,3D Acrylic Nail Handheld Sign Technician Photo Prop with Social Media Salon Nail Art Display Plate Gift for Nail Artist (Pink)
  • 1. Custom Nail art Tray: Show off your nails with our personalized nail art tray Photo Prop! This 4-inch disk is made of strong acrylic. It's great for anyone who loves nail art, works as a nail tech, or wants to promote their nail design. We laser engrave names and social media handles, then fill them with resin for a smooth look. Perfect for showing off your nails or promoting your nail business online.
  • 2. Material: Crafted from 5mm thick, high-quality acrylic,it provides a comfortable and secure grip, making it easy to hold while displaying your nail art. The glossy, smooth acrylic surface offers a perfect backdrop for your designs.
  • 3. Design: Sleek round acrylic disc with a cut-out notch for easy handling during photos.NOTE: Black will be prone to showing finger prints and dust/scratches easily.
  • 4. Ideal for Social Media and Business Promotion: Consistent use of the nailfie disk builds a cohesive, professional brand image, setting you apart from the competition. Whether you're attracting new clients or showcasing your talent, the nail art display plate is essential for promoting your business online.
  • 5. Perfect Gift for Nail Technicians: Personalized nail art tray disk is an ideal gift for any nail technician or artist.Whether for a friend, colleague, or even yourself, the nail art display plate is a gift that every nail professional will value and use frequently.

Are width and height required?

The protocol documents width and height as optional image properties. Add them when you know the pixel dimensions, but do not treat the example values as a universal platform rule.

Frequently Asked Questions

Can a social service display a different image from the one I declared?

Yes. Consumers control their own fetching, caching, cropping, and presentation. Verify the page on each service you support rather than assuming identical previews.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Where should Open Graph tags be placed?

Put them in the returned HTML document’s <head>, alongside the other Open Graph properties.

What should og:image:alt contain?

Describe what is visibly in the image. It should not be used as a caption or as a duplicate of the page title.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.