gulp-lazyimagecss
Be lazy, add images's CSS automatically, like
width
&height
and more.
Save time, make money.
NPM Home Page: https://www.npmjs.com/package/gulp-lazyimagecss
Install
Install with NPM:
npm install gulp-lazyimagecss --save
Usage
gulpfile.js
var lazyimagecss = ; gulp ;
Options
Set CSS which you wish to be added automatically.
options = lodash;
Result
CSS In
CSS Out
Tips: Use PostCSS with CSS Out
if needed.
Notes
- CSS property generating will be ignored if any of those
width
/height
/background-size
already set. - Both
background-image: url()
andbackground: url()
can be detected successfully. - Get image size from
HEX
data from file buffer via fast-image-size, more fast now. - Detect
PNG
&JPG
based on file signatures. - No minimum image buffer size limited now /fast-image-size/pull/5.
Contributing
This repo is build and maintained by TmT Team.
If you get any bugs or feature requests, please open a new Issue or send us Pull Request, Thank you for your contributions.