Open dovecancode opened 2 months ago
I also encountered this problem. What helped me was downgrading the imagemin version to 7.1.0. Accordingly, my package.json looks like this:
"devDependencies": {
"browser-sync": "^3.0.2",
"del": "^6.0.0",
"gulp": "^4.0.2",
"gulp-htmlmin": "^5.0.1",
"gulp-imagemin": "^7.1.0",
"gulp-newer": "^1.4.0",
"gulp-sass": "^5.0.0",
"gulp-size": "^4.0.1",
"gulp-sourcemaps": "^3.0.0",
"sass": "^1.37.5"
}
Try to use encoding false, it solves my problem with corrupted files
gulp.src(paths.images.src, {encoding: false})
https://github.com/imagemin/imagemin/issues/418#issuecomment-2183917076
Hi,
I'm quite new to using
gulp-imagemin
. I don't have any issues with minifyingSVGs
, but I've noticed that when it comes to.jpg
and.png
files, the images appear corrupted after running thenpx gulp
command.here is my gulpfile.js:
the output is on th left side and its corrupted or something like that