allbitsnbytes / gulp-imageoptim

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

Stream Support? #5

Closed huphtur closed 8 years ago

huphtur commented 8 years ago

Handing over a resized imaged to imageOptim (in the same stream) don't seem to work (example below works fine with imagemin). Any suggestions how to resolve this? Or should I look into task dependency?

gulp.task('images', function() {
  return gulp.src('src/images/**/*')
    .pipe(imageResize({
      width: "50%"
    }))
    .pipe(imageOptim.optimize())
    .pipe(gulp.dest('build/images'));
});
allbitsnbytes commented 8 years ago

Thanks for pointing out that issue. It's been fixed, 0.3.5.

huphtur commented 8 years ago

Still not working for me with 0.3.5.  :cry:

allbitsnbytes commented 8 years ago

I tested using gulp-image-resize and it's working fine for me. Are you getting an error message? What is it?

huphtur commented 8 years ago

Set up a separate test case and now things work! I must have done something weird in my original recipe. Thank you sir. Have a great 2016!