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
Post a Comment