spacecatninja / imager-x-imageoptim-optimizer
ImageOptim optimizer for Imager X
Installs: 2 724
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- craftcms/cms: ^3.3.0
- imageoptim/imageoptim: ^1.3
This package is auto-updated.
Last update: 2024-11-16 18:43:42 UTC
README
A plugin for adding an optimizer that uses ImageOptim to Imager X.
Also, an example of
how to make a custom optimizer for Imager X.
Requirements
This plugin requires Craft CMS 3.3.0 or later, and Imager X 3.0 or later.
Please note, this optimizer was previously part of Imager X' core, but has been separated out because the underlying PHP package doesn't support PHP 8.0. Until it does, you're currently locked into PHP 7.x if you continue using this optimizer.
Installation
To install the plugin, follow these instructions:
- Install with composer via
composer require spacecatninja/imager-x-imageoptim-optimizer
from your project directory. - Install the plugin in the Craft Control Panel under Settings > Plugins, or from the command line via
./craft plugin/install imager-x-imageoptim-optimizer
.
Usage
After installing the plugin, you can use the imageoptim
optimzier in your
imager-x.php config file the same way as you would any other optimizer:
'optimizers' => ['imageoptim'],
'optimizerConfig' => [
'imageoptim' => [
'extensions' => ['png', 'jpg', 'gif'],
'apiUsername' => 'yourusername',
'quality' => 'medium'
],
],
Price, license and support
The plugin is released under the MIT license. It requires Imager X, which is a commercial plugin available in the Craft plugin store. If you need help, or found a bug, please post an issue in this repo, or in Imager X' repo.