preload-images

1.5.12 • Public • Published

preload-images

NPM Version NPM Downloads MIT License Dependency Status

NPM

NPM

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

/preload-images/

    Package Sidebar

    Install

    npm i preload-images

    Weekly Downloads

    7

    Version

    1.5.12

    License

    MIT

    Last publish

    Collaborators

    • vivaxy
    • pendragon