omeka-s-themes / centerrow

GNU General Public License v3.0
2 stars 14 forks source link

Carousel can contain images it can't display #31

Closed zerocrates closed 4 years ago

zerocrates commented 4 years ago

The current check for whether files should appear in the carousel is that they have an image/ mimetype. This works fine for JPEGs, PNGs, but there are several semi-common image/ types that browsers mostly or always won't embed, and they should be getting excluded as well. TIFF is probably the most common, but JPEG2000 also comes to mind.

The check should probably instead be for the type being in a specific whitelist: ['image/bmp', 'image/gif', 'image/jpeg', 'image/png', 'image/svg+xml'] . Really just gif/jpeg/png is probably sufficient for the 95% use case... image/webp could also be used but isn't supported in Safari and it may be simpler to just not include.

kimisgold commented 4 years ago

@mebrett Just pushed fixes to only allow bmp, gif, jpeg, png, and svg files to appear in the carousel. Can you test that image files like tiffs get organized into the Other Media section? If all looks okay, I'm going to apply similar changes to Big Picture and The Daily.

mebrett commented 4 years ago

Tested it with a TIFF item, and it displays under "other media." Clicking on that takes me to the media's page - http://dev.omeka.org/mebrett/testomekas/s/publicviews/item/31536