From a14532e715a7159e98dabd6bc3bd84c17d425586 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 22 Nov 2018 13:25:31 -0700 Subject: [PATCH] Fixes #578 --- app/Util/Media/Image.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Util/Media/Image.php b/app/Util/Media/Image.php index bc88dda86..9351b8c05 100644 --- a/app/Util/Media/Image.php +++ b/app/Util/Media/Image.php @@ -112,7 +112,9 @@ class Image try { $img = Intervention::make($file)->orientate(); if($thumbnail) { - $img->crop($aspect['width'], $aspect['height']); + $img->resize($aspect['width'], $aspect['height'], function ($constraint) { + $constraint->aspectRatio(); + }); } else { $metadata = $img->exif(); $img->resize($aspect['width'], $aspect['height'], function ($constraint) {