Skip to content
This repository was archived by the owner on Nov 16, 2022. It is now read-only.

Commit fcd9851

Browse files
author
funatsu
committed
add keep aspect ration when resize with no option
1 parent a96b6de commit fcd9851

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Lib/ImageTransform.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ protected function thumbnailFit(Image $image, $width, $height)
154154
*/
155155
protected function thumbnailResize(Image $image, $width, $height)
156156
{
157-
return $image->resize($width, $height);
157+
return $image->resize($width, $height, function ($constraint) {
158+
$constraint->aspectRatio();
159+
});
158160
}
159161

160162
/**

0 commit comments

Comments
 (0)