From 6028ee75cec7920c6c45d7fc7b31fd27730166fd Mon Sep 17 00:00:00 2001 From: Dan Alvidrez Date: Thu, 27 May 2021 15:08:14 -0700 Subject: [PATCH] Update MediaStorage.php --- src/MediaStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MediaStorage.php b/src/MediaStorage.php index ec83e27..fa63028 100644 --- a/src/MediaStorage.php +++ b/src/MediaStorage.php @@ -94,7 +94,7 @@ protected function resize(UploadedFile $file): array // Resize the image. $image = Image::make($file->getRealPath()); if ($image->width() > $maxWidth || $image->height() > $maxHeight) { - $image->fit($maxWidth, $maxHeight, function (Constraint $constraint) { + $image->resize($maxWidth, $maxHeight, function (Constraint $constraint) { $constraint->aspectRatio(); $constraint->upsize(); });