New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proper configuration of imagemin plugins #190
Comments
https://github.com/sindresorhus/gulp-imagemin#imageminplugins-options
|
@shinnn I understand that |
@shinnn Thanks for putting me on the right track. It appears I was providing options for imagemin, which are a bit different from gulp-imagemin. Several boilperplates I referenced had gulp-imagemin configured incorrectly, I should have just gone right to the source. The following configuration works great:
With default configuration:
With pngquant and jpeg-recompress plugins enabled:
Thanks again! |
You're welcome, @nlenkowski.
I'd be glad if you could report this breaking change to the authors of those boilerplates when you have a time. |
Will do 👍 |
I've been trying unsuccessfully to to get the imagemin-pngquant plugin working with gulp-imagemin. No matter what I try my pngs are not compressed with pngquant. Here's my config:
package.json
gulpfile.js
I've tried switching
plugins: [pngquant()]
to the old valueuse: [pngquant()]
, to no affect.When running the images task with the above configuration I'm getting the following results:
alex.png (saved 63.87 kB - 19.6%)
.When I remove the
plugins: [pngquant()]
option I get the same:alex.png (saved 63.87 kB - 19.6%)
For comparison, when using gulp-image (which uses pngquant out of the box) I'm getting the following results for the same file:
alex.png -> before=318.79 KB after=150.62 KB reduced=168.17 KB(52.8%)
I'm on OS X 10.11.5 running node v6.2.2. I'm not sure if this is a problem with gulp-imagemin, imagemin-pngquant or my configuration.
The text was updated successfully, but these errors were encountered: