Skip to content
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

imagemin v. 3+ syntax and results logging #5

Open
malakdlo opened this issue Jul 11, 2017 · 0 comments
Open

imagemin v. 3+ syntax and results logging #5

malakdlo opened this issue Jul 11, 2017 · 0 comments

Comments

@malakdlo
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant