1
0
Fork 0

Fix image resizing logic

This commit is contained in:
Daniel Supernault 2018-05-26 16:37:46 -06:00
parent 9ca59f73b0
commit e94d9534b1
1 changed files with 2 additions and 2 deletions

View File

@ -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']);