This commit is contained in:
Daniel Supernault 2018-11-22 13:25:31 -07:00
parent 580bfd0bbe
commit a14532e715
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -112,7 +112,9 @@ class Image
try { try {
$img = Intervention::make($file)->orientate(); $img = Intervention::make($file)->orientate();
if($thumbnail) { if($thumbnail) {
$img->crop($aspect['width'], $aspect['height']); $img->resize($aspect['width'], $aspect['height'], function ($constraint) {
$constraint->aspectRatio();
});
} else { } else {
$metadata = $img->exif(); $metadata = $img->exif();
$img->resize($aspect['width'], $aspect['height'], function ($constraint) { $img->resize($aspect['width'], $aspect['height'], function ($constraint) {