allbitsnbytes / gulp-imageoptim

Gulp plugin to optimize images using ImageOptim
Other
22 stars 2 forks source link

doesn't work with watch #7

Open cavico opened 8 years ago

cavico commented 8 years ago

Every time I use gulp watch with ImageOptim, it multiply the length of files by itself. For example:

It only work well with one file per time.

My task: gulp.watch(['src/images/**/*'], function(event) { return gulp .src('./src/images/**/*.{png,gif,jpg}') .pipe(imageOptim.optimize()) .on('error', function (error) { console.error(String(error)); }) .pipe(gulp.dest('./dist/img')); });

Would you find out what it can be?

Thanks!

allbitsnbytes commented 8 years ago

Thank you for bringing this to my attention. I will look into it.