XML Sitemaps Generator

Author Topic: Image sitemap with srcset  (Read 3427 times)

paypal611

  • Registered Customer
  • Approved member
  • *
  • Posts: 4
Image sitemap with srcset
« on: March 08, 2016, 02:03:34 PM »
Hello!

Our new wordpress theme uses "srcset"
Example:
<img width="220" height="164" src="[external links are visible to admins only]" class="attachment-shop_catalog size-shop_catalog wp-post-image" alt="TEST" srcset="[external links are visible to admins only] 220w, [external links are visible to admins 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 admins only]ör-300x122.jpg%20300w,%20https://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 admins only]ör.jpg

Please ignore the German Umlaut. This will be fixed.

Thank you in advance.

XML-Sitemaps Support

  • Administrator
  • Hero Member
  • *****
  • Posts: 10623
Re: Image sitemap with srcset
« Reply #1 on: March 09, 2016, 03:50:29 AM »
Hello,

in this case you can add "," in Exclude URLs and generator will ignore srcset attributes with multiple URLs in it.
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.

paypal611

  • Registered Customer
  • Approved member
  • *
  • Posts: 4
Re: Image sitemap with srcset
« Reply #2 on: March 09, 2016, 10:58:18 AM »
Hi and thank you for your answer.
I tried to exclude URls containing "w,", but this only leads to ignoring the images.

XML-Sitemaps Support

  • Administrator
  • Hero Member
  • *****
  • Posts: 10623
Re: Image sitemap with srcset
« Reply #3 on: March 09, 2016, 02:39:50 PM »
What is an example page and image URL that is not included in sitemap?
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.

paypal611

  • Registered Customer
  • Approved member
  • *
  • Posts: 4
Re: Image sitemap with srcset
« Reply #4 on: March 09, 2016, 05:54:36 PM »
Here you are.

URL: [external links are visible to admins 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 admins only] 300w, [external links are visible to admins only] 309w" alt="pdf-download" src="[external links are visible to admins 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 admins only]

The URL of the image sitemap:
[external links are visible to admins only]

Thank you

XML-Sitemaps Support

  • Administrator
  • Hero Member
  • *****
  • Posts: 10623
Re: Image sitemap with srcset
« Reply #5 on: March 10, 2016, 03:45:07 AM »
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.
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.

 

SMF 2.0.12 | SMF © 2014, Simple Machines
XHTML RSS WAP2