1000ch / lazyload-image

HTMLImageElement extension for lazy loading.

Home Page:https://1000ch.github.io/lazyload-image/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

take account of responsive images

myakura opened this issue · comments

because of the new responsive image elements and attributes, we cannot guarantee that img.src is the resource that browsers load; rather, it becomes "a candidate resource".
you need to check if there's img.currentSrc and if so use the value instead of img.src.

@myakura Thanks for your pointing out. Should it be resolved with srcset feature? (merge into https://github.com/1000ch/srcset-image)

Fixed.