|
|
|
@ -86,10 +86,7 @@ class ImageResizePipeline implements ShouldQueue
|
|
|
|
$orientation = $aspect === 1 ? 'square' : ($aspect > 1 ? 'landscape' : 'portrait');
|
|
|
|
$orientation = $aspect === 1 ? 'square' : ($aspect > 1 ? 'landscape' : 'portrait');
|
|
|
|
$ratio = $orientations[$orientation];
|
|
|
|
$ratio = $orientations[$orientation];
|
|
|
|
|
|
|
|
|
|
|
|
$img = $img->resize($ratio['width'], $ratio['height'], function ($constraint) {
|
|
|
|
$img = $img->scaleDown($ratio['width'], $ratio['height']);
|
|
|
|
$constraint->aspectRatio();
|
|
|
|
|
|
|
|
$constraint->upsize();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$extension = pathinfo($file, PATHINFO_EXTENSION);
|
|
|
|
$extension = pathinfo($file, PATHINFO_EXTENSION);
|
|
|
|
if (in_array(strtolower($extension), ['jpg', 'jpeg'])) {
|
|
|
|
if (in_array(strtolower($extension), ['jpg', 'jpeg'])) {
|
|
|
|
|