Images not showing in Sitemap
-
Hi,
I can’t see any images indexed in my sitemap despite the option being turned on in Features in the Yoast plugin.
I have added a filter to the functions.php file of the theme. But still no luck. And it is not clear how to add images to the sitemap after following this article: https://yoast.com/help/images-in-the-xml-sitemap/
I have added this:
function filter_wpseo_sitemap_urlimages( $images, $post_id ) {
array_push($images, ‘https://site.ciom/wp-content/uploads/2021/02/images name’);
return $images;
};
add_filter( ‘wpseo_sitemap_urlimages’, ‘filter_wpseo_sitemap_urlimages’, 10, 2 );`What am I missing here and why do I have to specify a specific image in the filter? I would assume Yoast would do this automatically. I have Yoast Pro.
The page I need help with: [log in to see the link]
- The topic ‘Images not showing in Sitemap’ is closed to new replies.