-
My products registered with product schema of Rank Math is not listed in merchant listings due to missing image. There is no option to add image in product schema rather.Kindly provide a solution to add image to the schema either through plugin or by any code means.
-
Hello,
We apologize for the issue you are facing with the missing image in your product schema settings. To resolve the
Missing field “image”error in Google Search Console, please ensure that you have added a featured or product image to your WooCommerce product pages. Rank Math automatically includes the featured image in the Product Schema markup.Here are the steps to ensure that your images are correctly added:
-
Check Featured Image: Go to the affected product page in your WordPress dashboard and confirm that you have set a featured image. This is crucial as Rank Math uses this image for the Product Schema.
-
Set Schema Type: Ensure that the Schema Type is set to WooCommerce Product. You can do this by navigating to WordPress Dashboard → Rank Math SEO → Titles & Meta → Products and selecting WooCommerce Product as the Schema Type. Don’t forget to save changes.

-
Bulk Actions for Products: If you have multiple products, you can apply the WooCommerce Product Schema using bulk actions. Go to WordPress Dashboard → Products, select the affected products, choose Bulk actions, and select Set Schema: Default (product), then click Apply.

-
Product Gallery Images: If you want to include additional images, make sure to upload them in the product gallery section. Note that these images will only be included in the Product Schema if a product image is also uploaded.

If you have followed these steps and are still experiencing issues, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further. Thank you for raising this concern!
Sources:
Resolving Rank Math Schema Markup Related Issues
How to Use Product Schema for WooCommerce Products » Rank MathI’m not using Woocommerce, is there any solution without using Woocommerece. Expecting for a quicker response for resolution.
Thanks in advance 😄Hello,
If you’re using the
Woocommerce Productschema from our plugin, our plugin will automatically populate the schema data with the product information which includes the images.However, the basic
Productschema doesn’t have that option and if you wish to manually add the image path to the schema, you’ll need our PRO version.Another alternative is to modify the product schema structure using our provided filter code. Here’s the base code to start:
add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) { $entity['image'] = [ [ "@type" => "ImageObject", "url"=> "http://yourwebsite/wp-content/uploads/2024/09/some-image.jpeg", "height"=> "757", "width"=> "505" ] ]; return $entity; } );You may refer to this guide on how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Hope that helps.
I tried by adding using Code Snippet, but how to add this code on a specific product page as the “url”=> “http://yourwebsite/wp-content/uploads/2024/09/some-image.jpeg” varies for each product.
Hoping for a solution.Hello,
That would require the code to be modified to get the page ID and update the code accordingly. Here’s an example:
add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) { if( get_queried_object_id() == 1 ) { $entity['image'] = [ [ "@type" => "ImageObject", "url"=> "http://yourwebsite/wp-content/uploads/2024/09/some-image.jpeg", "height"=> "757", "width"=> "505" ] ]; } if ( get_queried_object_id() == 2 ) { $entity['image'] = [ [ "@type" => "ImageObject", "url"=> "http://yourwebsite/wp-content/uploads/2024/09/some-other-image.jpeg", "height"=> "757", "width"=> "505" ] ]; } return $entity; } );The IDs would need to be the IDs of the products and the process would need to be done manually in this case.
Don’t hesitate to get in touch if you have any other questions.
Thanks Miguel
Had tried this aproach, will update once the changes are reflected!Hello,
Sure, let us know how this goes.
Meanwhile, please don’t hesitate to contact us anytime if you have other questions to assist you further.
Looking forward to helping you.
Thank you.
Thanks team! My merchant listings had been approved by google.
Hello,
We’re delighted to hear that this issue has been resolved. We appreciate your feedback.
This ticket will be closed now, but if you ever have another question or need any help in the future, please don’t hesitate to create a new forum topic. We’ll be more than happy to assist you again.
Thank you for choosing Rank Math and have a wonderful day!
-
The ticket ‘No image addition in product schema setting’ is closed to new replies.