Koha Local Cover Images and Webp Image Format
Hi everyone, I'm starting to delve into the world of web page optimization and performance, looking at browser caching, mod_expires, mod_headers, and mod_deflate, etc.. I've come to learn that one of the better Web formats for images is the new Webp format (https://developers.google.com/speed/webp). I was wondering if there was anything in the works to make Koha compatible with Webp images for, say, local image covers? Or, has anyone tweaked Koha to allow for Webp image uploads? Obviously caching URLs is the way to go where possible, so I am running Coce and it's pretty reliable for modern publications; however, for older or rarer publications Coce's sources (Google and OpenLibrary) can only find so much. Sometimes local book covers are needed. Many thanks, Craig Butosi, MA, MLIS, B Mus (Hons) Library: library.craigbutosi.ca
I was wondering if there was anything in the works to make Koha compatible with Webp images for, say, local image covers?
The local cover image system uses the GD library to convert any of the accepted upload formats to PNG. It looks like the GD library also generates Webp images, so that seems possible. I haven't looked into Webp very much, but I've noticed that when I encounter them on a web page they're often included in such a way that there is a fallback image for browsers which don't support it. There are still some major gaps in browser support: https://www.caniuse.com/#feat=webp Since local cover images are stored in the database rather than the filesystem it would not be ideal to have to store more than one format, so if you wanted to support Webp you'd probably have to have a preference to turn it on and off, and then some process of rebuilding all the data in biblioimages from one format to the other. Another option would be the relatively new "CustomCoverImages" preference which allows you to host cover images yourself and use them in Koha based on a URL pattern. -- Owen -- Web Developer Athens County Public Libraries (740) 737-6006 https://www.myacpl.org
participants (2)
-
Craig Butosi -
Owen Leonard