faster svg thumbs
This commit is contained in:
parent
89ca23a4fd
commit
deb26ff7d3
1 changed files with 3 additions and 1 deletions
|
@ -46,7 +46,9 @@ class SVGFileHandler extends DataHandlerExtension
|
|||
protected function create_thumb(string $hash, string $type): bool
|
||||
{
|
||||
try {
|
||||
create_image_thumb($hash, $type, MediaEngine::IMAGICK);
|
||||
// Normally we require imagemagick, but for unit tests we can use a no-op engine
|
||||
if(defined('UNITTEST')) create_image_thumb($hash, $type);
|
||||
else create_image_thumb($hash, $type, MediaEngine::IMAGICK);
|
||||
return true;
|
||||
} catch (MediaException $e) {
|
||||
log_warning("handle_svg", "Could not generate thumbnail. " . $e->getMessage());
|
||||
|
|
Reference in a new issue