Lazysizes is a Google-suggested library for lazyloading, tested it on non-WP website and the usage is very simple, you just have to set proper class on element that you want to lazyload and it will work out of the box (takes care of both data-src and data-srcset).
So it shouldn't be hard to rewrite to make use of it.
Lazysizes is a Google-suggested library for lazyloading, tested it on non-WP website and the usage is very simple, you just have to set proper class on element that you want to lazyload and it will work out of the box (takes care of both data-src and data-srcset). So it shouldn't be hard to rewrite to make use of it.
https://github.com/aFarkas/lazysizes