Home Ask Login Register

Developers Planet

Your answer is one click away!

sitilge February 2016

Gulp image optimization breaks images

Using the gulp-image-optimization plugin. The plugin outputs, that the images are optimized; however they appear to be broken/empty after the script runs. A snippet of the gulpfile.js

gulp.task('img', function(cb) {
gulp.src(['public/img/**/*.png', 'public/img/**/*.jpg', 'public/img/**/*.jpeg', 'public/img/**/*.gif'])
        optimizationLevel: 5,
        progressive: true,
        interlaced: true
    .on('end', cb)
    .on('error', cb);

Can anyone explain to me why it happens?


eburger February 2016

According to the gulp blacklist, you should use gulp-imagemin instead.

Post Status

Asked in February 2016
Viewed 1,328 times
Voted 4
Answered 1 times


Leave an answer

Quote of the day: live life