Skip to content

Commit

Permalink
### Changed
Browse files Browse the repository at this point in the history
* Renamed the plugin from `ImageOptim` to `ImageOptimize`
* Added `.webp` support
  • Loading branch information
Andrew Welch committed Apr 10, 2017
1 parent 43542c7 commit 1615be9
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions src/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
"gif" => [
"gifsicle",
],
"webp" => [
"cwebp",
],
],

// Preset image processors
Expand Down Expand Up @@ -78,6 +81,11 @@
"commandPath" => "/usr/bin/gifsicle",
"commandOptions" => "-O3 -k 256",
],
// webp optimizers
"cwebp" => [
"commandPath" => "/usr/bin/cwebp",
"commandOptions" => "",
],
],

];
8 changes: 8 additions & 0 deletions src/models/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class Settings extends Model
'gif' => [
'gifsicle',
],
'webp' => [
'cwebp',
],
];

/**
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1615be9

Please sign in to comment.