@wandiparis/gulp-images

1.0.2 • Public • Published

gulp-images

Gulp task that optimizes images

npm version

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

See gulp.src globs parameter.

Default value : 'assets/img/**/*.{jpg,png,gif,svg}'

dest

See gulp.dest path parameter.

Default value : 'web/img'

jpg

See imagemin-mozjpeg options

Default value :

{
    quality: 95
}

png

See imagemin-pngquant options

Default value : {}

gif

See imagemin-gifsicle options

Default value : {}

svg

See imagemin-svgo options

Default value :

{
    plugins: [
        { removeViewBox: true }
    ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i @wandiparis/gulp-images

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

1.44 MB

Total Files

9

Last publish

Collaborators

  • drazik
  • laurent-bientz