npm

Need private packages and team management tools?Check out npm Orgs. »

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

Keywords

install

npm i preload-images

Downloadsweekly downloads

28

version

1.5.12

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability