How to change the Open Graph image in WordPress and verify it

Short answer

Open the WordPress post, set a social image in Yoast SEO, and update the post. Then check og:image in the public HTML and open that file while logged out. A blog cover and a social share image can be configured separately.

Read the guide
Share

Summarize with ChatGPT or Perplexity

How to change the Open Graph image in WordPress and verify it

Download the evidence (JSON)

Change the post’s social image in Yoast SEO

To change the image used for a shared URL, open the post and find Social media appearance in the Yoast SEO sidebar. Set the image, save the post, and check the published URL. The field location can vary by version. If the option is missing, confirm Open Graph is enabled and check the controls available in your edition. Yoast social metadata documentation.

Without a dedicated social image, Yoast may choose a featured image, a relevant image from the content, or a default image. The order depends on the content type and configuration. Change the individual post first when the update only belongs to one URL. A site-wide default can affect other posts. Yoast Open Graph image precedence.

Check og:image in the published WordPress HTML

Save the server response and search for og:image. You can use View Page Source in the browser. When a theme and plugin both emit metadata, record the order and identify the source of each value. Open Graph can allow more than one image, and the order can determine the preferred value. One intended primary image is easier to troubleshoot. Open Graph protocol.

curl -fsSL https://example.com/blog/post -o page.html
grep -Ei 'og:image|twitter:image' page.html

In PowerShell, use Select-String instead of grep.

Copy the actual og:image value and download it with a separate GET. Confirm the status, image type, expected pixels, and ability to load without signing in. Updating the post does not verify access to its image. On multilingual sites, repeat the check for each final locale URL.

curl -fsSL -D image-headers.txt https://example.com/media/cover.webp -o cover.webp

What two live WordPress pages returned

Locale og:image tags Image response Dimensions Blog card
RU 1 200 1200 × 630 contain
EN 1 200 1200 × 630 contain
The actual blog card for the 1200 × 630 cover. In this example the card and og:image use the same file.
The actual blog card for the 1200 × 630 cover. In this example the card and og:image use the same file.

The example uses two live WordPress pages. Each returned one og:image in the raw HTML, and twitter:image named the same file. A direct GET returned image/webp. The decoded image was 1200 × 630 pixels. The blog card used that same URL with object-fit: contain. The test did not render a preview on a third-party platform.

Why a share preview can still show the old image

If the raw HTML points to the old URL, inspect the post settings, selected locale, and HTML cache. If the URL changed but the file looks old, compare the response bytes and cache headers. Saving the replacement under a new filename makes it easier to distinguish the two assets. Once both the HTML and image are correct, use the target platform’s re-scrape or preview tools when available.

Verify the blog cover separately

When only the blog cover looks wrong, inspect the narrow and wide blog grids. A theme can load a different file through srcset or crop the same image with object-fit: cover. Updating the OG field cannot change that layout. For covers with label text, inspect the image edges and readability on a small screen.

Use the Reproleaf Open Graph checker to review the tags and identify competing values. Add the raw HTML, direct GET, and blog card to your post-release checks. During a technical SEO acceptance review, record the expected and observed file URL per locale.

FAQ

Do all sites need a 1200 × 630 image?

That was the size of the measured cover. Choose the dimensions for the platform that matters to you, and verify its actual preview.

Can the Russian and English posts have separate covers?

Yes. Set the image on each translated post, then inspect each language’s public HTML. A separate cover is useful when the artwork contains localized text.

← Back to blog

Need help with your website?

Development and SEO services →

Related articles