gulp-images
Gulp task that optimizes images
Installation
npm install --save-dev @wandiparis/gulp-images
Usage
Use with default parameters :
// gulpfile.js
const images = require("@wandiparis/gulp-images");
const compile = images();
module.exports = {
compile
};
Use with custom parameters (see below for the full list) :
// gulpfile.js
const images = require("@wandiparis/gulp-images");
const compile = images({
src: "path/to/img/**/*.{jpg,png}",
dest: "path/to/dest"
});
module.exports = {
compile
};
Parameters
src
Default value : 'assets/img/**/*.{jpg,png,gif,svg}'
dest
Default value : 'web/img'
jpg
Default value :
{
quality: 95
}
png
Default value : {}
gif
Default value : {}
svg
Default value :
{
plugins: [
{ removeViewBox: true }
]
}