From e94d9534b1bd719177445728e94749d4110d4ebb Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 26 May 2018 16:37:46 -0600 Subject: [PATCH] Fix image resizing logic --- app/Util/Media/Image.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Util/Media/Image.php b/app/Util/Media/Image.php index f9ee8342..a7d53d34 100644 --- a/app/Util/Media/Image.php +++ b/app/Util/Media/Image.php @@ -106,8 +106,8 @@ class Image { try { $img = Intervention::make($file); - $img->fit($aspect['width'], $aspect['height'], function ($constraint) { - $constraint->upsize(); + $img->resize($aspect['width'], $aspect['height'], function ($constraint) { + $constraint->aspectRatio(); }); $converted = $this->convertPngToJpeg($path, $thumbnail, $img->extension); $newPath = storage_path('app/'.$converted['path']);