mirror of
https://github.com/friendica/friendica
synced 2025-04-21 15:50:13 +00:00
Issue 12327: Convert avatars to static
This commit is contained in:
parent
62f982cf7e
commit
5bff6f38d7
5 changed files with 32 additions and 9 deletions
|
@ -182,6 +182,12 @@ class Photo extends BaseModule
|
|||
throw new HTTPException\InternalServerErrorException($error);
|
||||
}
|
||||
|
||||
if (!empty($request['static'])) {
|
||||
$img = new Image($imgdata, $photo['type']);
|
||||
$img->toStatic();
|
||||
$imgdata = $img->asString();
|
||||
}
|
||||
|
||||
// if customsize is set and image is not a gif, resize it
|
||||
if ($photo['type'] !== 'image/gif' && $customsize > 0 && $customsize <= Proxy::PIXEL_THUMB && $square_resize) {
|
||||
$img = new Image($imgdata, $photo['type']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue