image: clear imagick

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/767/head
Varun Patil 2023-07-23 15:26:41 -07:00
parent 79266d75b3
commit 2d6b025582
1 changed files with 2 additions and 0 deletions

View File

@ -393,6 +393,8 @@ class ImageController extends GenericApiController
$mimetype = $image->getImageMimeType();
} catch (\ImagickException $e) {
throw Exceptions::Forbidden('Imagick failed to convert image: '.$e->getMessage());
} finally {
$image->clear();
}
return [$blob, $mimetype];