diff --git a/CHANGELOG.md b/CHANGELOG.md index 53253554..8e0879f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # ImageOptimize Changelog +## 1.0.7 - 2017.04.10 +### Changed +* Renamed the plugin from `ImageOptim` to `ImageOptimize` +* Added `.webp` support + ## 1.0.6 - 2017.04.08 ### Changed * Added `createSettingsModel()` to the main plugin class diff --git a/README.md b/README.md index 4127fca5..bac984d6 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ ImageOptimize won't do anything on its own; you'll need to also install the imag * **optipng** - `sudo apt-get install optipng` * **svgo** - `sudo npm install -g svgo` * **gifsicle** - `sudo apt-get install gifsicle` +* **webp** - `sudo apt-get install webp` ## ImageOptimize Overview diff --git a/composer.json b/composer.json index 1065c221..49e35770 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "nystudio107/craft3-imageoptimize", "description": "Automatically optimize images after they've been transformed", "type": "craft-plugin", - "version": "1.0.6", + "version": "1.0.7", "keywords": [ "craft", "cms", diff --git a/src/config.php b/src/config.php index 2b4f1519..ab833d40 100644 --- a/src/config.php +++ b/src/config.php @@ -38,6 +38,9 @@ "gif" => [ "gifsicle", ], + "webp" => [ + "cwebp", + ], ], // Preset image processors @@ -78,6 +81,11 @@ "commandPath" => "/usr/bin/gifsicle", "commandOptions" => "-O3 -k 256", ], + // webp optimizers + "cwebp" => [ + "commandPath" => "/usr/bin/cwebp", + "commandOptions" => "", + ], ], ]; diff --git a/src/models/Settings.php b/src/models/Settings.php index e406092c..e1944475 100644 --- a/src/models/Settings.php +++ b/src/models/Settings.php @@ -42,6 +42,9 @@ class Settings extends Model 'gif' => [ 'gifsicle', ], + 'webp' => [ + 'cwebp', + ], ]; /** @@ -86,6 +89,11 @@ class Settings extends Model 'commandPath' => '/usr/bin/gifsicle', 'commandOptions' => '-O3 -k 256', ], + // webp optimizers + 'cwebp' => [ + 'commandPath' => '/usr/bin/cwebp', + 'commandOptions' => '', + ], ]; // Public Methods