Improved preview size

This commit is contained in:
Michael 2023-05-08 21:32:38 +00:00
parent 46d3778ee8
commit 1789266859
5 changed files with 24 additions and 18 deletions

View file

@ -207,13 +207,13 @@ class Upload extends \Friendica\BaseModule
if ($width > 640 || $height > 640) {
$image->scaleDown(640);
}
if ($width > 320 || $height > 320) {
$result = Photo::store($image, $owner['uid'], 0, $resource_id, $filename, $album, 1, Photo::DEFAULT, $allow_cid);
if ($result) {
$smallest = 1;
}
}
if ($width > 320 || $height > 320) {
$image->scaleDown(320);
$result = Photo::store($image, $owner['uid'], 0, $resource_id, $filename, $album, 2, Photo::DEFAULT, $allow_cid);
if ($result && ($smallest == 0)) {