A
A
Anton Schultz2020-03-13 20:52:59
gulp.js
Anton Schultz, 2020-03-13 20:52:59

How to fix did you forget to signal async completion in resize img?

When I try to run it, it gives an error did you forget to signal async completion
. I read that it helps to add an argument and call it at the end of the function, but it did not help either.

How to run this function or is there another working resizer for images?

https://www.npmjs.com/package/gulp-images-resizer

let resizer = require('gulp-images-resizer');

gulp.task('resize', done => {
    return gulp.src('style/images/**/*.jpg')
    .pipe(resizer({
            format: "jpg",
            width: "1200px"
        }))
    .pipe(gulp.dest('dest/'));
  done();
});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question