Site logo

Archived topic

OG:Image property is not set correctly for my posts

7 replies · Started by Charbel on November 3, 2022

Viewing posts 1–8 of 8

Hello @David,

After the last update of GeneratePress back on October 25, 2022.

I started having issues with my OG:Image to be taken from the Global RankMath settings (SEO TITLES & META) instead of taking the Featured Image that I set for each post.

Here is an example, after October 19, 2022:
https://charbelnemnom.com/delete-microsoft-sentinel-analytics-rule/
https://charbelnemnom.com/how-to-set-up-cloudflare-dns/
https://charbelnemnom.com/set-microsoft-sentinel-analytics-rules-at-scale/
https://charbelnemnom.com/what-is-cloudflare-rocket-loader/

Check the source code of <meta property=”og:image”>, you can see that the OG:image is taken from OpenGraph Thumbnail as shown in this screenshot:
I am using RankMath SEO - and this option has been set from a long time, in case I don't set a Featured Image, this image will be set as OG:image instead.

https://www.screencast.com/t/Al9RCqTR1x

And Before October 19, 2022, the OG:image is set correctly to my Featured Image.
Check these posts:
https://charbelnemnom.com/backup-and-restore-microsoft-sentinel-watchlists/
https://charbelnemnom.com/microsoft-defender-for-cloud-apps/
https://charbelnemnom.com/microsoft-sentinel-vs-splunk/
https://charbelnemnom.com/how-to-use-microsoft-365-defender/

I need to have my Feature Image be my <meta property=”og:image”>
https://www.screencast.com/t/eERyjrfBBH

Your help is highly appreciated.

I wasted too much time troubleshooting to find the root cause.

I am running the latest version of theme 3.2.1

Thank You!

Hi there,

you need to speak to RankMath, as its there plugin that generates and hooks in that meta. The Theme doesn't interfere with it.

Thank you @David for the confirmation,

I am checking with RankMath.

You're welcome

Hello @David,

Additional Info: Please find below reply from RankMath:

//
I can check that the featured image of the post is in WebP format. The Open Graph only supports image/jpeg, image/gif, or image/png.

You can also check this link for the standard image file extensions supported by Open Graph:
https://developers.facebook.com/docs/sharing/webmasters/#images

Please use the supported format to fix the issue.
\\

I am using the Performance Lab plugin https://wordpress.org/support/plugin/performance-lab/ that creates WebP versions for new JPEG image uploads.

Here is the ticket open with them:
https://wordpress.org/support/topic/how-to-exclude-featured-image-from-webp-format/#post-16164270

The plugin only modifies the HTML for both the content with the_content filter and the featured image with the post_thumbnail_html filter. As this implements the WebP image only in specific instances it shouldn’t impact the source image used for the Open Graph meta.

Hello @David, here is an additional video for your reference:
https://www.screencast.com/t/gQGjuZPEBRR

Could you please provide more insights?

The Perfomance Lab plugin support stated they only change the HTML.
Therefore the original URL should be intact eg. using: get_the_post_thumbnail_url

You need to go back to RankMath, explains the issue and ask them where they are getting the URL from, and ask how do you get the original.

The Theme has no involvement here.

Many Thanks, @David for the analysis, much appreciated!

You are great!!!

You're welcome

This archived topic is closed to new replies.