Page MenuHomePhabricator

Use thumbwidth instead of thumbsize when fetching lead image.
Closed, ResolvedPublic

Description

The thumbsize parameter restricts both the width and height (whichever is larger) of the desired thumbnail. For our lead image, we only need to restrict the width of the image, so we should now use the new thumbwidth parameter. (if the height of the image is significantly larger than the width, it can result in a poor-quality image because it's restricted based on height, and the width beomes proportionally smaller)

Event Timeline

Dbrant raised the priority of this task from to Needs Triage.
Dbrant updated the task description. (Show Details)
Dbrant subscribed.

Hi, this is my first task. I tried looking at the code but i couldn't figure out what this task is about. I couldn't find any trace of the thumbwith parameter i the code, is it possible that it has been removed since you created task? Could you please clarify what you mean or give me some pointers where to start? Thanks in advance

@Kittensofdoom This task requires a bit of familiarity with the MediaWiki API, particularly the "mobileview" query:
https://en.wikipedia.org/w/api.php?action=help&modules=mobileview

This is what the app uses to fetch the actual page contents and metadata from the server.
If you look at PageViewFragmentInternal.java:1075, that's where we currently set the "thumbsize" parameter and pass it to the API. This needs to be changed to "thumbwidth".
Actually, looking at the code again, I think that's literally the only change that needs to be done.

Although this task is blocked by T98528, I wanted a fix readily available. We can merge this fix whenever that task is resolved. Here is the changeset: https://gerrit.wikimedia.org/r/#/c/245701

Probz360 subscribed.

Change 335219 had a related patch set uploaded (by Mholloway):
Use thumbwidth instead of thumbsize when fetching lead image

https://gerrit.wikimedia.org/r/335219

Change 335220 had a related patch set uploaded (by Mholloway):
Use thumbwidth instead of thumbsize when fetching lead image

https://gerrit.wikimedia.org/r/335220

Change 335220 merged by jenkins-bot:
Use thumbwidth instead of thumbsize when fetching lead image

https://gerrit.wikimedia.org/r/335220

Change 335219 merged by Mholloway:
Use thumbwidth instead of thumbsize when fetching lead image

https://gerrit.wikimedia.org/r/335219

Mholloway claimed this task.

Looks like this is long since resolved.