Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webp support #209

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Webp support #209

wants to merge 2 commits into from

Conversation

phette23
Copy link

@phette23 phette23 commented Jul 25, 2024

Description

Please describe briefly your pull request.

Adds .webp support to previewer. The previews may not look great without also telling flask-iiif to handle webp files. I added the following to my invenio.cfg and then the previews were full-size and looked as good as for other formats:

from flask_iiif.config import IIIF_FORMATS, IIIF_FORMATS_PIL_MAP
IIIF_FORMATS["webp"] = "image/webp"
IIIF_FORMATS_PIL_MAP["webp"] = "webp"

I think I will submit a parallel PR to flask-iiif with those default config changes. But this PR could be merged first without any harm and instances could always override their flask_iiif.config as above.

Edit: IIIF PR is inveniosoftware/flask-iiif#98

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

I didn't touch any tests but didn't see ones for each image type, let me know if I missed something.

Frontend

phette23 added 2 commits July 25, 2024 15:57
this provides the most basic support for webp images but works best
with a couple settings changes to flask-iiif as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant