faster svg thumbs
This commit is contained in:
parent
89ca23a4fd
commit
deb26ff7d3
@ -46,7 +46,9 @@ class SVGFileHandler extends DataHandlerExtension
|
|||||||
protected function create_thumb(string $hash, string $type): bool
|
protected function create_thumb(string $hash, string $type): bool
|
||||||
{
|
{
|
||||||
try {
|
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;
|
return true;
|
||||||
} catch (MediaException $e) {
|
} catch (MediaException $e) {
|
||||||
log_warning("handle_svg", "Could not generate thumbnail. " . $e->getMessage());
|
log_warning("handle_svg", "Could not generate thumbnail. " . $e->getMessage());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user