PNG files are corrupted after Gulp upgrade to 5.0
ArtemAvramenko opened this issue · comments
Artem commented
PNG files are corrupted in the most basic scenario:
gulp.src(['src/images/*.png'])
.pipe(gulp.dest('dist/'));
Reverting to v4.0.2 solved the problem.
- OS & version: Windows 10 Home 22H2
- node version: 18.17.1
- npm version: 9.6.7
- gulp version: 5.0.0
minerva-mscaroni commented
Same error here: not only PNG files, but also JPG and WEBP are corrupted. I've noticed that output files are also bigger (in KB) than original ones.
Johan Tor commented
minerva-mscaroni commented
You're right: I forgot to mention font files (woff/woff2 in my case)!
Mikhail commented
Same error with JPEG files
add to src encode { encoding: false }
Karma commented
I advise you to first look through the magazine with closed questions that already have answers. In order not to multiply the same type of questions every day :)