Displaying Tifs in CenterRow


I’m working on setting up a site with the CenterRow theme. Each item will have a set of jpgs and a set of tifs. I’d like it to display the jpgs and leave the tifs available for download.

Right now, it displays the jpgs, but not the tifs, and doesn’t allow them to be downloaded. (When trying the Cozy theme, it does allow me to click and download them).

The PDF files I attached do appear under other media, but the formatting seems strange - one is left-aligned, one looks like it’s right-aligned.

Thanks in advance!

…when clicking on the tiff thumbnail

PDF “other media” formatting

I think the issue here is that Center Row decides what it can show in the “carousel” area by checking, basically, that the file is an image. Anything else (like the PDFs you mention) get listed separately so they’re still accessible.

The problem is that TIFFs are images, but they’re ones that most browsers cannot or will not display, so they really should be getting treated more like PDFs in this case.

I’ve filed an issue and we’ll look into fixing this in future theme releases.

For the time being, it’s something you could edit in the view/omeka/site/item/show.phtml file in your theme: there should be a line that looks like this fairly near the top of that file:

if ((strpos($mediaType, 'image/') !== false) || (strpos($mediaRenderer, 'youtube') !== false)) {

Replacing that with:

if (in_array($mediaType, ['image/jpeg', 'image/png', 'image/gif']) || (strpos($mediaRenderer, 'youtube') !== false)) {

Should cause it to exclude the TIFF images from the carousel and show them in the list with the others.

1 Like

Thanks so much! Will give this a try!

Confirming this works! Thanks!