]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Photo.php
Ward against empty JsonLD::fetchElement result in ActivityPub\Receiver::processTags
[friendica.git] / src / Module / Photo.php
index a4ef6ab414e005ca3a0248544556a1eba8c28ca9..78e403e6c751cda090c977b82a99ef33e1935d6a 100644 (file)
@@ -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']);