All Projects → 1000ch → lazyload

1000ch / lazyload

Licence: other
Minimal lazy image loader.

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
coffeescript
4710 projects

lazyload

About

This is minimal library to load image lazy. Images will be loaded when they are shown.

Try it

Clone repository and open index.html.

$ git clone [email protected]:1000ch/lazyload.git
$ cd lazyload
$ open index.html

Usage

<img src='before.png' data-src='after.png' width='100' height='100'>
<script src='lazyload.js'></script>
<script>new Lazyload();</script>

I recommend you to set blank DataURI to src attribute, and include this script into project's concatenated file.

<img
  src='data:image/gif;base64,R0lGODlhAQABAIAAAP//////zCH5BAEHAAAALAAAAAABAAEAAAICRAEAOw=='
  data-src='after.png' width='100' height='100'>

License

MIT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].