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

Add thumbnails to Wikimedia #3075

Open
krysal opened this issue Sep 28, 2023 · 4 comments
Open

Add thumbnails to Wikimedia #3075

krysal opened this issue Sep 28, 2023 · 4 comments
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: catalog Related to the catalog and Airflow DAGs

Comments

@krysal
Copy link
Member

krysal commented Sep 28, 2023

Problem

Related to #2442, we have seen tiff images coming from Wikimedia, so while that issue gets solved, we can also add thumbnails to these images and prevent situations where the browser can't show the image, like the following case:

https://openverse.org/image/3caf9d55-f9b3-471b-9ce2-926fdb07a0e4

Screenshot 2023-09-27 at 14-24-39 File France Rouen 16th century - Leaf from a Book of Hours- Adam and Eve and the Fall of Man (Prefatory Mini - 2001 79 a - Cleveland Museum of Art tif Openverse

Description

We can get the thumbnail of the width we want appending the param iiurlwidth=<desired_number> to the API endpoint, e.g: https://commons.wikimedia.org/w/api.php?action=query&titles=File:Albert%20Einstein%20Head.jpg&prop=imageinfo&iiprop=url|user|dimensions|extmetadata|mediatype|size&iiurlwidth=600

One possible issue with this is that the documentation says:

For performance reasons if this option is used, no more than 50 scaled images will be returned.

Our current batch limit is set to 250.

Additional context

Source: https://wmds-archive.toolforge.org/t/accessing-a-commons-thumbnail-via-wikidata/499/

@krysal krysal added 🟨 priority: medium Not blocking but should be addressed soon ✨ goal: improvement Improvement to an existing user-facing feature 💻 aspect: code Concerns the software code in the repository 🧱 stack: catalog Related to the catalog and Airflow DAGs labels Sep 28, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Openverse Backlog Sep 28, 2023
@krysal krysal changed the title <Replace this with actual title> Add thumbnails to Wikimedia Sep 28, 2023
@HarrySidhuz0008

This comment was marked as spam.

@sarayourfriend
Copy link
Collaborator

We've started generating thumbnail URLs on the fly for Wikimedia in #4736. Do we still need proper thumbnail URLs in the catalogue for Wikimedia? One of the difficulties is that the Wikimedia thumbnail endpoint also supports compression and resizing. Building them in the API means we have finer grained control over where we send parameters for those things, which also improves our ability to serve thumbnails for TIFFs and other formats Photon does not support. Using static thumbnail URLs in the catalogue would limit our ability to take advantage of that.

Can we close this issue in favour of the solution in #4736 or do y'all feel that is only a stop-gap, and a catalogue based approach would be better suited?

@AetherUnbound
Copy link
Collaborator

I have seen this and will respond to this discussion when I have time!

@sarayourfriend
Copy link
Collaborator

Sounds good. I was mostly expecting @krysal to reply as the author of the issue, just to clarify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: catalog Related to the catalog and Airflow DAGs
Projects
Status: 📋 Backlog
Development

No branches or pull requests

4 participants