• Welcome to Sitemap Generator Forum.
 

Image sitemap with srcset

Started by paypal611, March 08, 2016, 02:03:34 PM

Previous topic - Next topic

paypal611

Hello!

Our new wordpress theme uses "srcset"
Example:
<img width="220" height="164" src="[ External links are visible to forum administrators only ]" class="attachment-shop_catalog size-shop_catalog wp-post-image" alt="TEST" srcset="[ External links are visible to forum administrators only ] 220w, [ External links are visible to forum administrators only ] 138w" sizes="(max-width: 220px) 100vw, 220px" />

Problem:
The images sitemap generates URLs that lead into a 404 not found. The links look like this:
[ External links are visible to forum administrators only ]/www.mixcard.de/wp-content/uploads/2012/11/Basis_handyzubehör.jpg%20428w   

I would prefer to get a URL like [ External links are visible to forum administrators only ]

Please ignore the German Umlaut. This will be fixed.

Thank you in advance.

XML-Sitemaps Support

Hello,

in this case you can add "," in Exclude URLs and generator will ignore srcset attributes with multiple URLs in it.

paypal611

Hi and thank you for your answer.
I tried to exclude URls containing "w,", but this only leads to ignoring the images.


paypal611

Here you are.

URL: [ External links are visible to forum administrators only ]
Image:
<img class="alignnone size-full wp-image-2843" width="309" height="188" sizes="(max-width: 309px) 100vw, 309px" srcset="[ External links are visible to forum administrators only ] 300w, [ External links are visible to forum administrators only ] 309w" alt="pdf-download" src="[ External links are visible to forum administrators only ]">

Now the line is excluded because of the rule "w,"

I want this image to be in the sitemap:
[ External links are visible to forum administrators only ]

The URL of the image sitemap:
[ External links are visible to forum administrators only ]

Thank you

XML-Sitemaps Support

Yes, that is expected - all images defined in srcset with "," in it would be excluded in this case. You need to define one image per "src" or "srcset" attribute to include it in sitemap, multiple images in <img> tag are not supported.