Gulp Imagemin not finishing
Asked Answered
K

1

7

This is my Gulp task:

//Image Optimization
gulp.task( 'imagemin', function () {
    return gulp.src( imageDir + '**/*.{png,jpg,JPG,svg}' )
        .pipe( imagemin( {
            progressive: true,
            use: [
                pngquant({quality: 20 - 30}),
                jpeg({max: 50})
            ],
            optimizationLevel: 7
        } ) )
        .pipe( gulp.dest( imageDir ) );
} )

I am using gulp imagemin and "imagemin-pngquant", as well as "imagemin-jpegoptim"

In my source I have two images, one jpg and one png. The jpg becomes compressed, but not the png.

This is what my CLI looks like: enter image description here

No Errors, no Finish.

Keown answered 25/1, 2016 at 14:13 Comment(2)
I am having the same problem :(Billibilliard
You seem to be using imagemin syntax not gulp-imagemin. Try imagemin([pngquant({quailty: 20-30, progressive: true}), jpeg({max: 50, progressive: true})])Dandruff
K
0

You have followed syntax of gulp- image not gulp-imagemin. If you are using gulp-image just change your jpeg to jpegRecompress where can you set min, max and other property.

Koval answered 27/12, 2018 at 18:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.