mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
Update app/Util/Media/Image.php
Co-authored-by: Daniel Mason <daniel@m2.nz>
This commit is contained in:
parent
27b715cb35
commit
c43f9ab7a4
1 changed files with 4 additions and 1 deletions
|
@ -159,7 +159,10 @@ class Image
|
||||||
$media->metadata = json_encode($meta);
|
$media->metadata = json_encode($meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ($ratio['width_original'] > $aspect['width']) || ($ratio['height_original'] > $aspect['height']) ) {
|
if (
|
||||||
|
($ratio['width_original'] > $aspect['width'])
|
||||||
|
|| ($ratio['height_original'] > $aspect['height'])
|
||||||
|
) {
|
||||||
$img->resize($aspect['width'], $aspect['height'], function ($constraint) {
|
$img->resize($aspect['width'], $aspect['height'], function ($constraint) {
|
||||||
$constraint->aspectRatio();
|
$constraint->aspectRatio();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue