ressio / lazy-load-xt

Lazy load XT is a jQuery plugin for images, videos and other media
http://ress.io/lazy-load-xt-jquery/
MIT License
1.36k stars 245 forks source link

Srcset, trailing comma character added to src value causing broken image path #74

Open shawnkelshaw opened 8 years ago

shawnkelshaw commented 8 years ago

<img data-srcset="images/ux/min/small.jpg, images/ux/min/medium.jpg 320w, images/ux/min/large.jpg 768w" class="lazy"/>

The above raw HTML snippet of code is generating the output below causing the image url path to break due to an extra comma (see src="images/ux/min/small.jpg[comma]")

<img data-srcset="images/ux/min/small.jpg, images/ux/min/medium.jpg 320w, images/ux/min/large.jpg 768w" src="images/ux/min/small.jpg,">

I'm almost certain it's user error, but having trouble narrowing it down. Thanks in advance for the assistance. Great utility! Thanks!

Browser: Chrome Version 48.0.2564.103 m

shawnkelshaw commented 8 years ago

Nevermind. I think I fixed it myself. The first image item needs a width value...