Templates, themes, and plugins may use shortcodes to output images on a post/page. When this happens those images are not counted and therefore to do not on the sitemap. Yoast will show the image count as 0 as Yoast is not able to follow the shortcode to locate the images.
We should provide a filter for users or let plugins register with Yoast in order to output the images into the sitemap
+1
Please find a way! Thanx in advance
The wpseo_xml_sitemap_img filter (documented here) allows you or your developer to add images to the sitemaps.
Oh, I can't follow this "documentation".
I just want Yoast plugin to collect and count all images like other plugins do, too...
In my case, images are included using a php mask in Wordpress dashboard. So I absolutely do not know what to do with your solution... sorry. Actually there is no "page or post" available with the images. The pages will be compiled in an backend php workaround.
Please inform the customer of conversation # 304738 when this conversation has been closed.
Hi ! I am facing the same issue. I am using yoast and none of my images appear in sitemaps. People on different forums told me not to use any page builder and uninstall jetpack. I have done all but still images are shown as zero. My theme doesn't have this (wordpress-seo/inc/sitemaps/class-sitemap-image-parser.php) exact path. Inc is there but it has no sitemaps folder where I can go and apply this filter. Kindly if you guide me where to paste this filter, keeping in mind that I have to do it myself and I am a non techie.
My site is https://bigcontentbay.com
+1. Since the default way to create a gallery in wordpress uses a shortcode, this should be a basic feature of the plugin.
sorry maybe i'm dumb, but amboutwe posted a link titled "documented here" that leads to a block of code that appears to be related and possibly some kind of solution but contains no actual documentation or otherwise method of implementation for the average wordpress user. what is the way to get yoast to add this seemingly basic function that is negatively affecting the seo of incalculable websites? best seo plugin can't parse images added via shortcode after all these years? how do we get a resolution?
I'm still dumb, too. I don't know how to get the increddible Yoast plugin just to collect my images... for month, now. Just to send a link to a code is really no doucmentation.