Answer the question
In order to leave comments, you need to log in
How to exclude folder from gulp-imagemin processing?
The question is in the title. The method given below leads to the fact that in general all images are not processed. I created an issue on github, the author sent it to stackoverflow.
gulp.task('default', function () {
return gulp.src(['src/images/**', '!src/images/sprites/**'])
.pipe(imagemin())
.pipe(gulp.dest('dist'));
});
Answer the question
In order to leave comments, you need to log in
What version is being used?
Try again like this
gulp.task('default', function () {
return gulp.src(['./src/images/**/*', '!./src/images/sprites/**/*'])
.pipe(imagemin())
.pipe(gulp.dest('./dist/images'));
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question