0

I'm trying to get the srcset working so I can have multiple images loaded on different screensizes but it gives me the following error in the console:

"Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid."

This is how I'm trying to use srcset:

<img src="images/promo/promo-categories/1a/01-promo-category-option-1a-xl.jpg" srcset="images/promo/promo-categories/1a/01-promo-category-option-1a-xl.jpg 1601w, images/promo/promo-categories/1a/02-promo-category-option-1a-large.jpg 1442w, images/promo/promo-categories/1a/03-promo-category-option-1a-medium.jpg 1280w, images/promo/promo-categories/1a/04-promo-category-option-1a-ms.jpg 1164w, images/promo/promo-categories/1a/05-promo-category-option-1a-small.jpg 948w, images/promo/promo-categories/1a/06-promo-category-option-1a-xs.jpg 814w, images/promo/promo-categories/1a/07-promo-category-option-1a-xxs.jpg 768w, images/promo/promo-categories/1a/08-promo-category-option-1a-mob-wide.jpg 480w, images/promo/promo-categories/1a/09-promo-category-option-1a-mob-small.jpg 320w, images/promo/promo-categories/1a/10-promo-category-option-1a-mob-xs.jpg 0w" alt="Volledig assortiment" title="Volledig assortiment" />
Larsmanson
  • 413
  • 1
  • 5
  • 18
  • Possible duplicate of [What does "Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid." mean?](https://stackoverflow.com/questions/31074180/what-does-failed-parsing-srcset-attribute-value-since-its-w-descriptor-is-i) – ProEvilz Sep 21 '17 at 14:04
  • I suspect the problem is the space after 1a-xl.jpg. Nonetheless, check out the thread above. – ProEvilz Sep 21 '17 at 14:04
  • Tip: Copy & paste the error into Google first time around and you'll see that the exact same question tends to be already answered. – ProEvilz Sep 21 '17 at 14:06
  • 0w might be invalid. – sleepytea Mar 30 '23 at 04:30

0 Answers0