diff --git a/src/OptimizerChainFactory.php b/src/OptimizerChainFactory.php index 634bad6..20d6da0 100644 --- a/src/OptimizerChainFactory.php +++ b/src/OptimizerChainFactory.php @@ -15,9 +15,11 @@ public static function create(array $config = []): OptimizerChain { $jpegQuality = '--max=85'; $pngQuality = '--quality=85'; + $webpQuality = '-q 80'; if (isset($config['quality'])) { $jpegQuality = '--max='.$config['quality']; $pngQuality = '--quality='.$config['quality']; + $webpQuality = '-q '.$config['quality']; } return (new OptimizerChain()) @@ -48,10 +50,10 @@ public static function create(array $config = []): OptimizerChain '-O3', ])) ->addOptimizer(new Cwebp([ + $webpQuality, '-m 6', '-pass 10', '-mt', - '-q 80', ])); } }