UniversalViewer / universalviewer

A community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎
http://universalviewer.io
Other
489 stars 184 forks source link

Support webp when requesting images #640

Open irv opened 5 years ago

irv commented 5 years ago

Firefox 65 now supports webp, like chrome already does

example: https://developers.google.com/speed/webp/gallery1

There's an encoding overhead vs jpg, but a not-inconsequential drop in filesize. If I really, really cared about latency, I might want to make requests for webp if the info.json returns webp in formats for v2 or extraFormats for v3 (and I had cached the webp tiles!)

In an ideal world, I would want to control the ordering of my preferred formats. The default could be "jpg" to match current behaviour, but I could specify "webp, jpeg" so that if my endpoint supports webp i get webp, otherwise I still request jpg. Of course, you may want to default to png if you're crazy.

tomcrane commented 5 years ago

This is an issue for UV when showing thumbs, or if there is no image service but a choice of image resources. For Image services, this would be a job for OpenSeadragon in its iiifTileSource class (the info.json is what gets handed over to OSD, either by URL or "by value").

eroux commented 5 years ago

there's another issue to solve with OSD first I think

LlGC-szw commented 1 year ago

All issues will be triaged for further investigation or closure by the 28 September 2023. If your issue is still relevant and would like for it be investigated further please comment by 14 September 2023.

demiankatz commented 10 months ago

Looks like the OSD piece of this is done now; maybe still worth considering.