Gulp 5 corrupt images
deco1974 opened this issue · comments
I want to copy images to the dist folder:
src(
[
'./src/img/*.*',
]
).pipe(dest('./dist/img'));
The images get corrupted in Gulp 5. Downgrade to Gulp 4.0.0.2 everything is working fine as expected.
Is there something i miss in the new version?
Looks like using {encoding: false} will solve the issue, but {read: false} will work just to copy files. In my case I'm converting the images to webp, so {read:false} doesn't work.
@aloayzab88 if you are modifying the contents, you need to read the file so you'll turn encoding off