Hey, be lazy! bLazy.JS is a lightweight pure JavaScript script for lazy loading and multi-serving images. It's working in all modern browsers including IE7+.
See the codebLazy is a lightweight script for lazy loading and multi-serving images, iframes, videos and more (less than 1.4KB minified and gzipped). It’s written in pure JavaScript why it doesn’t depend on 3rd-party libraries such as jQuery. It lets you lazy load and multi-serve your images so you can save bandwidth and server requests. The user will have faster load times and save data usage if he/she doesn't browse the whole page.
Table of Contents
More examples: http://dinbror.dk/blazy/examples/
Codepen playground: http://codepen.io/dinbror/pen/HzCAJ
You can install blazy.js with npm:
npm install blazy --save
or bower:
bower install blazy --save
If you don't want to host the script yourself you can link to the latest minified file:
//cdn.jsdelivr.net/blazy/latest/blazy.min.js on jsDelivr.
Exchange latest with the specific version number if you want to lock it in.
load function.this issue defaulting to window when passing revalidate or destroy in setTimeout as reference #73 and #112. Thanks PeteDuncanson.Element.closest which was introduced in the container fix in v. 1.8.0.breakpoints as obsolete. Will be removed in upcoming version. Use srcset and/or the picture element instead./example/index.html.revalidate().load function so it's now possible to pass a list of elements instead of only one element. Tested with getElementById, getElementsByClassName, querySelectorAll, querySelector and jQuery selector.load function with force attribute, so you can force hidden images to be loaded.breakpoints because it's much more descriptive.error callback.separator. Used if you want to pass retina images, default separator is ‘|’. (data-src=“image.jpg|[email protected]”).errorClass. Classname an image will get if something goes wrong, default is ‘b-error’.successClass so naming is aligned. Default is still ‘b-loaded’.success.error.loadedClass. Classname an image will get when loaded.##LICENSE: Copyright (c) 2013-16 Bjørn Klinggaard. Licensed under the The MIT License (MIT).
Overall
Maintained
Code review
npm
Latest release
Releases this year
427 followers · starred Nov 2016
6,025 followers · starred Feb 2017
150 followers · starred Jan 2016
46 followers · starred Jul 2016
Hey, be lazy! bLazy.JS is a lightweight pure JavaScript script for lazy loading and multi-serving images. It's working in all modern browsers including IE7+.
See the codebLazy is a lightweight script for lazy loading and multi-serving images, iframes, videos and more (less than 1.4KB minified and gzipped). It’s written in pure JavaScript why it doesn’t depend on 3rd-party libraries such as jQuery. It lets you lazy load and multi-serve your images so you can save bandwidth and server requests. The user will have faster load times and save data usage if he/she doesn't browse the whole page.
Table of Contents
More examples: http://dinbror.dk/blazy/examples/
Codepen playground: http://codepen.io/dinbror/pen/HzCAJ
You can install blazy.js with npm:
npm install blazy --save
or bower:
bower install blazy --save
If you don't want to host the script yourself you can link to the latest minified file:
//cdn.jsdelivr.net/blazy/latest/blazy.min.js on jsDelivr.
Exchange latest with the specific version number if you want to lock it in.
load function.this issue defaulting to window when passing revalidate or destroy in setTimeout as reference #73 and #112. Thanks PeteDuncanson.Element.closest which was introduced in the container fix in v. 1.8.0.breakpoints as obsolete. Will be removed in upcoming version. Use srcset and/or the picture element instead./example/index.html.revalidate().load function so it's now possible to pass a list of elements instead of only one element. Tested with getElementById, getElementsByClassName, querySelectorAll, querySelector and jQuery selector.load function with force attribute, so you can force hidden images to be loaded.breakpoints because it's much more descriptive.error callback.separator. Used if you want to pass retina images, default separator is ‘|’. (data-src=“image.jpg|[email protected]”).errorClass. Classname an image will get if something goes wrong, default is ‘b-error’.successClass so naming is aligned. Default is still ‘b-loaded’.success.error.loadedClass. Classname an image will get when loaded.##LICENSE: Copyright (c) 2013-16 Bjørn Klinggaard. Licensed under the The MIT License (MIT).
Overall
Maintained
Code review
npm
Latest release
Releases this year
427 followers · starred Nov 2016
6,025 followers · starred Feb 2017
150 followers · starred Jan 2016
46 followers · starred Jul 2016