-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
After i have migrated a previous installation of Nextcloud 14.0.2 from Ubuntu 16.04 to Ubuntu 18.04 and then NC 14.0.4 the preview for some TIF images wasn't working.
NextCloud version : 14.0.4
Operating system and version : Ubuntu 18.04
Apache : 2.4
PHP version : 7.2
ImageMagick : 6.9.7-4
I have first posted the issue in Support Section : https://help.nextcloud.com/t/nc14-problems-with-preview-tif-ai-raw-images-on-new-installation/42445
Files having issues :
-
the TIF images containing .tiff extension
-
The TIF images having a MimeType recognized as image/x -dcraw
I don't know if the causes of this malfunctions is the 14.0.4 NC update or the new Imagick Library installed by default on Ubuntu 18.04
The first fix was to modify the PreviewManager.php line 368
adding an image magick provider for the TIFF files =>
'TIFF' => ['mimetype' => '/image\/tif/', 'class' => Preview\TIFF::class]
The second fix was to add a provider for the mimetype 'image/x-dcraw'
$this->registerCoreProvider(Preview\TIF::class, '/image\/x-dcraw/');
I have to add it as a a registerCoreProvider because the imagickProviders is using only one extension by mimetype.