n5s / local-bin-spatie-image-optimizer
Configure spatie/image-optimizer to use local binaries.
1.1.3
2024-06-28 12:30 UTC
Requires
- php: ^8.1
- n5s/local-bin: ^1.0
- n5s/local-bin-cwebp: ^1.0
- n5s/local-bin-gifsicle: ^1.0
- n5s/local-bin-jpegoptim: ^1.0
- n5s/local-bin-libavif: ^1.0
- n5s/local-bin-optipng: ^1.0
- n5s/local-bin-pngquant: ^1.0
- spatie/image-optimizer: ^1.7
README
Configure spatie/image-optimizer to use local-bin-* binaries.
Install
composer require n5s/local-bin-spatie-image-optimizer
Usage
Pass your Spatie\ImageOptimizer\OptimizerChain
through OptimizerChainLocalizer::localize
so that all supported optimizers are configured to use the local binary paths.
use n5s\LocalBin\Integration\SpatieImageOptimizer\OptimizerChainLocalizer; use Spatie\ImageOptimizer\OptimizerChainFactory; $optimizerChain = OptimizerChainLocalizer::localize(OptimizerChainFactory::create());