Elementor gallery images are not indexed in sitemap by Yoast Seo
-
Hello,
I am having trouble with indexing images using the Yoast SEO plugin. The sitemap generated by Yoast only includes some images, likely excluding those from the Elementor gallery. I’ve read many forums, and the common response is that this is a known issue with the Elementor gallery, but no fix is currently available.
My question is: Are there any solutions available now to resolve this issue?I would like to continue using both the Elementor and Yoast SEO plugins. I’ve also seen from Yoast support that there’s a filter (
wpseo_sitemap_urlimages
) that can be used to manually add image URLs that are not included in the sitemap:function filter_wpseo_sitemap_urlimages( $images, $post_id ) { array_push($images, ['src' => 'https://www.example.com/wp-content/uploads/extra-image.jpg', 'title' => get_the_title( $post_id )]); return $images; }; add_filter( 'wpseo_sitemap_urlimages', 'filter_wpseo_sitemap_urlimages', 10, 2 );
Is there a way to use this filter to automatically include all images from the
wp-content/uploads/
directory in the sitemap?
Thank you for your response.
- You must be logged in to reply to this topic.