diff --git a/src/Drivers/ImageDriver.php b/src/Drivers/ImageDriver.php index 4d6e4d20..17a660a5 100644 --- a/src/Drivers/ImageDriver.php +++ b/src/Drivers/ImageDriver.php @@ -105,5 +105,5 @@ public function quality(int $quality): self; public function format(string $format): self; - public function optimize(OptimizerChain $optimizerChain): self; + public function optimize(?OptimizerChain $optimizerChain = null): self; } diff --git a/src/Image.php b/src/Image.php index cc878add..ec1c6282 100644 --- a/src/Image.php +++ b/src/Image.php @@ -311,7 +311,7 @@ public function format(string $format): ImageDriver return $this; } - public function optimize(OptimizerChain $optimizerChain): ImageDriver + public function optimize(?OptimizerChain $optimizerChain = null): ImageDriver { $this->imageDriver->optimize($optimizerChain);