简体   繁体   中英

Lazysizes.js doesn't switch between responsive images?

I'm trying to get the lazysizes.js plugin working ( https://github.com/aFarkas/lazysizes )

On my images I have:

<img data-srcset="medium.jpg 768w, small.jpg 634w" data-src="small.jpg 634w" data-size="auto" class="lazyload">

However, to matter what size screen I view it on it always seems to use the medium.jpg image size.

I'm really puzzled how to set Lazyload up.

Would anyone know what I'm missing?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM