Jump to content

Topic on Extension talk:QuickInstantCommons/Flow

Problem rendering TIF files

4
Ostrzyciel (talkcontribs)

Hi, I've noticed that after enabling QuickInstantCommons, TIF files from Commons stopped displaying in articles. See for example this page https://nonsa.pl/wiki/Patelnia with this image https://nonsa.pl/n/A3

I'm not sure why that is, but I suspect it may have something to do with TIF thumbnails having a different extension than the original file, they use .tif.jpg.

Bawolff (talkcontribs)

I think i found the culprit. In TiffHandler.php in MW core it hard codes built in InstantCommons.

        public function canRender( $file ) { 
                global $wgTiffThumbnailType;

                return (bool)$wgTiffThumbnailType
                        || $file->getRepo() instanceof ForeignAPIRepo;
        }

sigh

Ostrzyciel (talkcontribs)

Ouch.

I managed to temporarily fix it by setting:

$wgTiffThumbnailType = [ 'jpg', 'image/jpeg' ];

Sooo thanks for the hint! ;)

Bawolff (talkcontribs)

I made a new version (version 1.2) that will ignore built in tiff handler.

I don't think $wgTiffThumbnailType = [ 'jpg', 'image/jpeg' ]; should work (unless transformVia404 is false) because commons uses PagedTiffHandler instead which uses an incomaptible url format.

I think for best results, install PagedTiffHandler extension so it matches the one used on commons, but the new version should work regardless.

I've also been told there are issues with TimedMediaHandler files.

Reply to "Problem rendering TIF files"