I don't know if this is how I'm supposed to submit a suggestion for a change, but I was running into an issue using the video syntax and wasn't able to optimize the images or see the results in the console.
I found that imagemin v. 3+ no longer requires pngcrush, and has slightly changed syntax, specifically:
.pipe(gulpif(env === 'prod', imagemin([ imagemin.jpegtran({ progressive: true }), imagemin.optipng({ optimizationLevel : 5 }), imagemin.svgo({ plugins: [{ removeViewBox: true }]}) ], { verbose: true })))
instead of:
`
.pipe(gulpif(env === 'production', imagemin({
progressive: true,
svgoPlugins: [{ removeViewBox: false }],
use: [pngcrush()]
})))
`
Hope it helps.
I don't know if this is how I'm supposed to submit a suggestion for a change, but I was running into an issue using the video syntax and wasn't able to optimize the images or see the results in the console.
I found that imagemin v. 3+ no longer requires pngcrush, and has slightly changed syntax, specifically:
.pipe(gulpif(env === 'prod', imagemin([ imagemin.jpegtran({ progressive: true }), imagemin.optipng({ optimizationLevel : 5 }), imagemin.svgo({ plugins: [{ removeViewBox: true }]}) ], { verbose: true })))instead of:
`
.pipe(gulpif(env === 'production', imagemin({
progressive: true,
svgoPlugins: [{ removeViewBox: false }],
use: [pngcrush()]
})))
`
Hope it helps.