diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2021-01-17 21:09:31 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2021-01-19 20:17:10 +0100 |
commit | 6d4afca7ace0b62f4256b18a0cab60f180ebbc07 (patch) | |
tree | d9659629bbfa8bf45dabffb2ad2c4387e161d16e /lib/private/PreviewManager.php | |
parent | 3406032cf8ff3062329dd7a18937a2ec3dbfbf8d (diff) | |
download | nextcloud-server-6d4afca7ace0b62f4256b18a0cab60f180ebbc07.tar.gz nextcloud-server-6d4afca7ace0b62f4256b18a0cab60f180ebbc07.zip |
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 <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/PreviewManager.php')
-rw-r--r-- | lib/private/PreviewManager.php | 4 |
1 files changed, 3 insertions, 1 deletions
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.*/'); |