From 486f9cf7274722dafbd2d0420385dd265f99d2b8 Mon Sep 17 00:00:00 2001
From: Thomas Coopman <thomas.coopman@gmail.com>
Date: Thu, 17 Sep 2020 10:41:32 +0200
Subject: [PATCH] fix #263

---
 README.md | 3 +--
 index.js  | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 36536b9..4669fbb 100644
--- a/README.md
+++ b/README.md
@@ -61,7 +61,6 @@ rules: [{
       options: {
         mozjpeg: {
           progressive: true,
-          quality: 65
         },
         // optipng.enabled: false will disable optipng
         optipng: {
@@ -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).
 
diff --git a/index.js b/index.js
index edf446c..f746ac1 100644
--- a/index.js
+++ b/index.js
@@ -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')) {
@@ -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