Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Commit

Permalink
fix #263
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoopman committed Sep 17, 2020
1 parent 83d8ea0 commit 486f9cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ rules: [{
options: {
mozjpeg: {
progressive: true,
quality: 65
},
// optipng.enabled: false will disable optipng
optipng: {
Expand Down Expand Up @@ -96,7 +95,7 @@ And optional optimizers:

- [webp](https://github.com/imagemin/imagemin-webp)*Compress JPG & PNG images into WEBP*

_Default optimizers can be disabled by specifying `optimizer.enabled: false`, and optional ones can be enabled by simply putting them in the options_
_Each optimizers can be disabled by specifying `optimizer.enabled: false`, and optional ones can be enabled by simply putting them in the options_

If you are using Webpack 1, take a look at the [old docs](http://webpack.github.io/docs/using-loaders.html) (or consider upgrading).

Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = function(content) {
optipng: config.optipng || {},
svgo: config.svgo || {},
// optional optimizers
webp: config.webp || {}
webp: config.webp || { enabled: false }
};
// Remove in interlaced, progressive and optimizationLevel checks in new major version
if (config.hasOwnProperty('interlaced')) {
Expand Down Expand Up @@ -79,7 +79,7 @@ module.exports = function(content) {
if(options.optipng.enabled !== false)
plugins.push(require('imagemin-optipng')(options.optipng));
// optional optimizers
if(options.webp)
if(options.webp.enabled !== false)
plugins.push(require('imagemin-webp')(options.webp));

imagemin
Expand Down

0 comments on commit 486f9cf

Please sign in to comment.