- Issue created by @IT-Cru
I have hereby attached the patch for adding image styles to XML Sitemaps.
- πΊπ¦Ukraine Skymen
For some reason previous patch not worked for me. I wrote updated and improved version. Please check.
- π©πͺGermany IT-Cru Munich
@skymen: Have you tested patch file or plain diff of existing MR which in my mind should be used for further development of this feature.
Could you maybe also provide diff of your added changes :)
- πΊπ¦Ukraine Skymen
Hi @it-cru. Sure, I have tested diff from previous MR.
In my case (Drupal 11.1, attached media with image file to nodes) image url was generated with wrong path. As I remember, "images" was disappeared from path. Also on sitemap settings page "image style" select box was appeared dispite selection "add image in sitemap" - "No". Double conversion uri->path->uri was in previous version. So I had written the code for getting uri and return path with image style in other part of code. Maybe something else, I don't remember.
Now almost everything work on my site
Only one thing - I can't implement translation of the text for image link in sitemap, according to the 'title' field in media entity. As I investigated, it can't be possible without big changes of code.