Skip to content

Gulp 5 - Copied images using .src and .dest are corrupt #2777

Closed as not planned
@rickdoesburg

Description

@rickdoesburg

Before you open this issue, please complete the following tasks:

  • use the search bar at the top of the page to search this repository for similar issues or discussions that have already been opened.
  • if you are looking for help from the gulp team or community, open a discussion.
  • if you think there is a problem with the plugin you're using, open a discussion.
  • if you think there is a bug in our code, open this issue.

What were you expecting to happen?

I except files to be copied to my dist folder

What actually happened?

The files are copied, but the images are corrupt and unreadable. Tried both .jpeg and .webp

Please give us a sample of your gulpfile

const gulp = require("gulp");

// Copy assets to dist
gulp.task("copy", () => {
    return gulp.src(["./assets/**/*"], { base: "./assets/" }).pipe(gulp.dest("./dist/"));
});

// Default task
gulp.task("default", gulp.parallel("copy"));

Terminal output / screenshots

~/Projects/gulp-5-copy-demo » gulp copy 
[09:29:35] Using gulpfile ~/Projects/gulp-5-copy-demo/gulpfile.js
[09:29:35] Starting 'copy'...
[09:29:35] Finished 'copy' after 90 ms

Please provide the following information:

  • OS & version [e.g. MacOS Catalina 10.15.4]: 14.4.1 (23E224)
  • node version (run node -v): v20.8.0
  • npm version (run npm -v): 10.1.0
  • gulp version (run gulp -v): 5.0.0 / CLI 3.0.0

Additional information

Running this command on gulp4 causes no issues. After updating to gulp 5 the images are still copied but are corrupt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions