n5s/local-bin-spatie-image-optimizer

Configure spatie/image-optimizer to use local binaries.

1.1.3 2024-06-28 12:30 UTC

This package is auto-updated.

Last update: 2024-11-28 13:32:34 UTC


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());