Open k33 opened 7 years ago
With this we would install it via bower to do this we would need to setup a bower.json file. But this would then need to be updated for each new project. Perhaps we should list this as a recommended plugin to use within the install / wiki? @willmcl what do you think?
I use a lazyloading plugin called lazysizes. It is written in ‘vanilla’ JavaScript, so has no dependencies.
I include this script in every single project I build and use it on almost every image on a site. What it basically does is defer the load of the image until the rest of the page has loaded. It also only loads images if they are close to the viewport, so images far down the page don't get loaded until they are needed.
I find that images usually make up the bulk of any page — in KBs loaded — and are therefore the biggest bottleneck for page load.