gulp-imageoptim
gulp-imageoptim copied to clipboard
Optimization failing
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?
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?
Yes. I purchased it through the app store.
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.