Custom/filterable image url for taxonomy and front page sitemap images.
I am using a plugin to add images to taxonomies and I cannot see a filter to add the URL of the term images to the sitemap. I have already done this with my OpenGraph and Twitter images for the last couple of years but cannot find a filter in Yoast that will allow me to add the correct URL to the sitemap for the term images when using a plugin.
Looking at the Yoast code on Github (class-taxonomy-sitemap-provider.php & class-sitemap-image-parser.php) it appears that the image for terms are parsed from the image tag in the term description and there is no way to filter the URL directly. Other methods for filtering sitemap images appear to be solely for posts/pages.
This doesn’t appear very flexible or developer friendly
As per @devnihil request via my post at https://wordpress.org/support/topic/custom-sitemap-images-for-taxonomies/#post-16165798 I am requesting this is a new feature for Yoast.
I'd like to second this request. I have played around with the "wpseo_sitemap_urlimages" filter but as @slr1979 also suggested, this filter only works for posts and pages. There appears to be no way to filter the images for taxonomies, for example to add missing images to the sitemap. The same problem exists for the homepage. There appears to be no way to filter the images for the homepage, in any case not if the homepage is configured as a blog page (latest posts). I'm mentioning that here because it appears to be exactly the same problem as with the taxonomies. And, just like with taxonomies, the homepage is of course a page that very often has additional content containing images, for which it makes sense to add such images to the sitemap.
@devnihil , or anyone else from "team Yoast", can you please review this?
@jdevalk @jeroenrotty This may be really cheeky but I posted this feature request nearly 3 months ago and no one has responded to my or @GoldenGoldy requests to have this reviewed. I think it is quite important and it would be great if someone could be assigned to look into this. I didn't know who else I could tag to get some attention :-)
Thanks everyone for your continued patience. It was outside of my radar until today and it makes sense for the wpseo_sitemap_urlimages filter to also work for the taxonomies. I will forward it internally to the appropriate team.
@mmikhan sounds good! Just to check though, as you specifically say taxonomies, will the enhancement also make sure it would work for the homepage as well? (see previous comment in this thread) Also, once you forward it to the relevant team, do you have an indication on how long it might take for this to be updated?
@mmikhan That's great news and thank you for replying to my cheeky poke! As @GoldenGoldy has stated I would also appreciate an ETA on this once the team has been notified of the request.
@GoldenGoldy since the title of the issue says taxonomies, I referred it as well during my last comment. But, it's definitely something to look into when picking this up for development to see we can fix it for the homepage as well. But, it depends on the complexity of-course and can't confirm anything right now.
In regards to the ETA, I can confirm that we moved it to the backlog of our plugin team. This means it will be picked but can't confirm when as it depends on the current queue.
This is definitely a required feature for many websites.
This is definitely a required feature for many websites.
Totally agree. Like I already mentioned in #19944 : product archive (product category)pages are the most important core pages for a lot of webshops. Must have feature.
Well, I did create the original feature request 9 months ago. It would be great to get an update or indeed have this integrated asap @mmikhan . I am pretty sure looking at the code it would not be too hard to integrate a filter to return the required url for the image?
@jeroenrotty @jdevalk This feature request is over a year old. Any chance someone can take a look?
I no longer work for Yoast, so can’t help here.
We cannot re-use/extend wpseo_sitemap_urlimages since the signature has a post ID, so we need to introduce another filter following a similar pattern
That would be awesome if we could have another filter following a similar pattern to finally solve this issue. Thank you!