From 6d4afca7ace0b62f4256b18a0cab60f180ebbc07 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Sun, 17 Jan 2021 21:09:31 +0100 Subject: Add support for webp Including handling in OC_Image But also a preview provider Of course only works if your php actually supports webp Signed-off-by: Roeland Jago Douma --- lib/private/PreviewManager.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/private/PreviewManager.php') diff --git a/lib/private/PreviewManager.php b/lib/private/PreviewManager.php index 8fa0fc92da5..1d65da8ca59 100644 --- a/lib/private/PreviewManager.php +++ b/lib/private/PreviewManager.php @@ -58,7 +58,7 @@ class PreviewManager implements IPreview { /** @var Generator */ private $generator; - + /** @var GeneratorHelper */ private $helper; @@ -314,6 +314,7 @@ class PreviewManager implements IPreview { Preview\HEIC::class, Preview\XBitmap::class, Preview\Krita::class, + Preview\WebP::class, ]; $this->defaultProviders = $this->config->getSystemValue('enabledPreviewProviders', array_merge([ @@ -360,6 +361,7 @@ class PreviewManager implements IPreview { $this->registerCoreProvider(Preview\GIF::class, '/image\/gif/'); $this->registerCoreProvider(Preview\BMP::class, '/image\/bmp/'); $this->registerCoreProvider(Preview\XBitmap::class, '/image\/x-xbitmap/'); + $this->registerCoreProvider(Preview\WebP::class, '/image\/webp/'); $this->registerCoreProvider(Preview\Krita::class, '/application\/x-krita/'); $this->registerCoreProvider(Preview\MP3::class, '/audio\/mpeg/'); $this->registerCoreProvider(Preview\OpenDocument::class, '/application\/vnd.oasis.opendocument.*/'); -- cgit v1.2.3