gulpjs / gulp

A toolkit to automate & enhance your workflow

Home Page:https://gulpjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PNG files are corrupted after Gulp upgrade to 5.0

ArtemAvramenko opened this issue · comments

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

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.

Have same issue with font files.

Src on the left, dest on the right with a basic gulp.src(PATHS.fonts.src).pipe(gulp.dest(PATHS.fonts.dest));

image

You're right: I forgot to mention font files (woff/woff2 in my case)!

Same error with JPEG files

add to src encode { encoding: false }

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 :)

Duplicates #2777