workflows icon indicating copy to clipboard operation
workflows copied to clipboard

imagemin v. 3+ syntax and results logging

Open malakdlo opened this issue 8 years ago • 0 comments

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.

malakdlo avatar Jul 11 '17 01:07 malakdlo