Skip to content

Releases: sindresorhus/gulp-imagemin

v9.0.0

02 Nov 20:15
Compare
Choose a tag to compare

Breaking

v8.0.0...v9.0.0

v8.0.0

12 Aug 15:50
Compare
Choose a tag to compare

v7.1.0

21 Jan 09:32
Compare
Choose a tag to compare

v7.0.0

16 Jan 04:44
Compare
Choose a tag to compare

Breaking

  • Require Node.js 10 aacca91
  • Replace jpegtran with mozjpeg in the default plugins (#336) 279a91b

v6.2.0...v7.0.0

v6.2.0

12 Nov 12:34
Compare
Choose a tag to compare

v6.1.1...v6.2.0

v6.1.1

04 Oct 08:06
Compare
Choose a tag to compare
  • Make Gulp an optional peer dependency 165bf8b

v6.1.0...v6.1.1

v6.1.0

18 Aug 21:11
Compare
Choose a tag to compare

v6.0.0...v6.1.0

v6.0.0

30 May 10:30
Compare
Choose a tag to compare

Breaking:

v5.0.3...v6.0.0

v5.0.0

11 Jan 04:54
Compare
Choose a tag to compare

Breaking:

Other:

3.0.0

08 May 05:47
Compare
Choose a tag to compare

Previously, the options you passed in each applied to different bundled plugins. This was confusing for many users. Now you explicitly pass options directly to the plugins you use. By default, this module comes bundled with 4 imagemin plugins with good defaults. Most should not need to change anything. If you do need to pass some options or use other plugins, you can pass in an array of plugins with options in the use argument, overriding the defaults.

Here's how you would transition the different options:

 gulp.task('default', () => {
    return gulp.src('src/images/*')
-       .pipe(imagemin({
-           interlaced: true,
-           progressive: true,
-           optimizationLevel: 5,
-           svgoPlugins: [{removeViewBox: false}]
-       }))
+       .pipe(imagemin([
+           imagemin.gifsicle({interlaced: true}),
+           imagemin.jpegtran({progressive: true}),
+           imagemin.optipng({optimizationLevel: 5}),
+           imagemin.svgo({plugins: [{removeViewBox: false}]})
+       ]))
        .pipe(gulp.dest('dist/images'));
 });

Note that if you pass in an array of plugins you need to explicitly pass in every plugin you want, not just the ones you want to change options for.

v2.4.0...v3.0.0