preload-images
v1.5.12
Published
build preload images
Downloads
77
Readme
preload-images
build preload images for events
installation
[sudo] npm install -g preload-images
usage
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.
advanced usage
show helps
preload -h
or
preload --help
set image width
default width 160
preload -w 160
or
preload --width 160
set image quality
default quality 10
preload -q 10
or
preload --quality 10
specify html file
preload -f ./index.html
or
preload --file ./index.html
debug mode
preload -d
or
preload --debug
show version
preload -v
or
preload --version