• Welcome to Sitemap Generator Forum.
 

How to deal with images having srcSet attributes

Started by info2500, February 17, 2022, 09:22:34 AM

Previous topic - Next topic

info2500

Hello,

I have discovered an "issue" as also mentioned in older posts:

https://www.xml-sitemaps.com/forum/index.php/topic,9177.html



I have this setup in basically all my images as it is the current state of art of front end dev to deliver different image sizes to the end user:


<img src="{domain}image-small.jpg" srcset="{domain}image-small.jpg w300, {domain}image-medium.jpg w600, {domain}image-big.jpg 1000w">


My generated images sitemap looks as follows (obfuscated the domain), where the spaces and size width triggers are parsed. But the src attribute is not parsed at all, SG only parses the srcSet.


<image:loc>{domain...}thumb.jpg%20320w,%20{domain...}-thumb.jpg%20768w,%20{domain...}-thumb.jpg%201024w,%20{domain...}-thumb-x2.jpg%201600w</image:loc>


I assume this is not a valid sitemap xml for the search engines.

⁇ Any solution or workaround I can implement ⁇