1
0
Daniel Supernault 6 жил өмнө
parent
commit
a14532e715

+ 3 - 1
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) {