build preload images for events
[sudo] npm install -g preload-images
In your project folder, preload
.
This will change your html files to:
<img src="some.jpg" data-preload>
to <img src="some-small.jpg" data-preload="some.jpg" data-preload-origin="some.jpg">
And add a script <script data-preload="">
to the bottom of html body.
preload -h
or
preload --help
default width 160
preload -w 160
or
preload --width 160
default quality 10
preload -q 10
or
preload --quality 10
preload -f ./index.html
or
preload --file ./index.html
preload -d
or
preload --debug
preload -v
or
preload --version