Skip to content

imagemin v. 3+ syntax and results logging #5

Description

@malakdlo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions