javascript - Gulp image optimization breaks images -


using gulp-image-optimization plugin. plugin outputs, images optimized; appear broken/empty after script runs. snippet of gulpfile.js

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

can explain me why happens?

according gulp blacklist, should use gulp-imagemin instead.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -