mirror of
https://github.com/friendica/friendica
synced 2025-05-14 07:44:10 +02:00
Improved preview size
This commit is contained in:
parent
46d3778ee8
commit
1789266859
5 changed files with 24 additions and 18 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue