diff --git a/src/Interfaces/ImageInterface.php b/src/Interfaces/ImageInterface.php index 41633a5e..f43baceb 100644 --- a/src/Interfaces/ImageInterface.php +++ b/src/Interfaces/ImageInterface.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Intervention\Image\Interfaces; use Countable; +use Intervention\Image\Encoders\AutoEncoder; use Intervention\Image\Origin; use IteratorAggregate; @@ -66,7 +67,7 @@ interface ImageInterface extends IteratorAggregate, Countable * @param EncoderInterface $encoder * @return EncodedImageInterface */ - public function encode(EncoderInterface $encoder): EncodedImageInterface; + public function encode(EncoderInterface $encoder = new AutoEncoder()): EncodedImageInterface; /** * Save the image to the specified path in the file system. If no path is