Skip to content

Preview Gallery not working on some TIF and TIFF #12876

@vindic

Description

@vindic

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 :

  1. the TIF images containing .tiff extension

  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapneeds info

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions