Answer the question
In order to leave comments, you need to log in
caching for gulp-imagemin?
Welcome all! Can you tell me how to make gulp-imagemin compress only new images when I run it? Let's say I made a task:
//=======================================================
// Images
//=======================================================
gulp.task('img', function () {
return gulp.src('./src/images/**')
.pipe(plugins.debug())
.pipe(plugins.imagemin({
progressive: true,
svgoPlugins: [{removeViewBox: false}],
use: [pngquant()]
}))
.pipe(gulp.dest('./app/images/'));
});
{since: gulp.lastRun('img')}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question