Rank Math is a revolutionary WordPress SEO Plugin that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible :bulb: :chart_with_upwards_trend: →
Describe the bug
When configuring a site I'm adding a fallback OpenGraph thumbnail on the 'SEO Title & Meta' section, but when I'm loading the page or post in concrete, what is displaying as a meta tag for og:image is the first image of the content.
To Reproduce
Steps to reproduce the behavior:
Go to 'SEO Title & Meta'
Add a fallback OpenGraph thumbnail
Open a random page/post (not frontpage or archive/tag/category)
Check the og:image meta tag
Expected behavior
I'd expect to have what the text of the image is commenting: When a featured image or an OpenGraph Image is not set for individual posts/pages/CPTs, this image will be used as a fallback thumbnail when your post is shared on Facebook.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: macOS
Browser: Chrome
Version: 1.0.204
Additional context
May I'm wrong, but seems the steps done to get the image doesn't fit with what the expected behavior commented. On requiring the images for any OpenGraph network the class Image is used, in concrete its method set_images:
Describe the bug When configuring a site I'm adding a fallback OpenGraph thumbnail on the 'SEO Title & Meta' section, but when I'm loading the page or post in concrete, what is displaying as a meta tag for
og:image
is the first image of the content.To Reproduce Steps to reproduce the behavior:
og:image
meta tagExpected behavior I'd expect to have what the text of the image is commenting:
When a featured image or an OpenGraph Image is not set for individual posts/pages/CPTs, this image will be used as a fallback thumbnail when your post is shared on Facebook.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context May I'm wrong, but seems the steps done to get the image doesn't fit with what the expected behavior commented. On requiring the images for any OpenGraph network the class
Image
is used, in concrete its methodset_images
:https://github.com/rankmath/seo-by-rank-math/blob/5acf665a91ae87f2a64ead498e3fe6e773be33c2/includes/opengraph/class-image.php#L300-L334
The method
set_singular_image()
will be triggered on the switch, and here are the steps this methods is doinghttps://github.com/rankmath/seo-by-rank-math/blob/5acf665a91ae87f2a64ead498e3fe6e773be33c2/includes/opengraph/class-image.php#L470-L502
So, basically:
So, there's no trace of getting the image from the settings 👍