allbitsnbytes / gulp-imageoptim

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

Optimization failing #6

Open benkutil opened 8 years ago

benkutil commented 8 years ago

I’m getting the following error when I try to run my images gulp task

{ [Error: Command failed: bash node_modules/gulp-imageoptim/scripts/optimize.bash b7548d98bb65523ae6d042877f679cec --jpegmini
]
  killed: false,
  code: 1,
  signal: null,
  cmd: 'bash node_modules/gulp-imageoptim/scripts/optimize.bash b7548d98bb65523ae6d042877f679cec --jpegmini' }

My gulp task looks like this:

gulp.task('images', () => {
    return gulp.src('dist/media/**/*')
        .pipe($.imageoptim.optimize({
            jpegmini: true
        }))
        .pipe(gulp.dest('shared/media'))
  });

Any thoughts on how I could debug the issue?

allbitsnbytes commented 8 years ago

There are a few ways we can debug this, but first, do you have jpegMini installed on your mac? Also if this is not a trial, is it activated?

benkutil commented 8 years ago

Yes. I purchased it through the app store.

allbitsnbytes commented 8 years ago

One way to debug this is to open scripts/optimize.bash and comment out line 51. Then after running gulp look for the following file: gulp_imageoptim_results.log

Hopefully the contents of the log would provide more information about the issue.