I cant minify my images because of thumbs.db file, when I try to minify my images, I get a permission error which looks like this:
Error: EPERM: operation not permitted, open 'C:\Users\Pc\Desktop\template\dist\img\Thumbs.db'
I get it why it does this but I don't know how to prevent this.
Edit 1: gulp snippet
gulp.task('imageMin', () =>
gulp.src('src/img/*')
.pipe(imagemin())
.pipe(gulp.dest('dist/img'))
);
--verbose
? Looking through gulp-imagemin's source a bit it seems like it should skip any files that aren't a recognized image type. So, maybe--verbose
will shed some light on the issue? Edit: Probably scratch that actually, this is probably related to [gulp-]imagemin not having read permissions for that file, but trying to read it anyway...gulp.task('imageMin', () => gulp.src('src/img/*') .pipe(imagemin()) .pipe(gulp.dest('dist/img')) );