-
Notifications
You must be signed in to change notification settings - Fork 1.3k
POTD widget fails with huge images #2820
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
Comments
The API that we use lets us specify the height and width properties.
API doc: https://www.mediawiki.org/wiki/API:Imageinfo We can either choose to send these params for all our media calls, which would mean adding these params in Should we hardcode the height and width or should be it determined on the phone's hardware capabilities? @domdomegg @misaochan |
I don't mind either way - I think it would be ideal if we could do it by the phones hardware but only if it doesn't over complicate the code. Otherwise I think something like fixing a max width and height would be good. |
I think it's OK to set a (reasonable) max height and width, for most phone screens that should be fine IMO. My main concern would be tablet users who would have a much bigger screen and be more likely to notice. I wonder if setting the max height and width based on screen size would be a good idea? @nicolas-raoul @neslihanturan |
Anything based on px can be noticed based on different devices. But we can not get a dp based API response either. So I think we can calculate required values based on the screen if this won't be too complicated. |
Commons is the highest-consuming app when I look at my 10GB mobile data plan usage, even though I don't use the app that much and don't upload more than 100MB per month. I guess many people in other countries have smaller data plans and no WiFi. So, in all activities, we should really try our best to avoid using too much bandwidth, while still showing picture in a quality that satisfies pro photographers. The balance is difficult, but I hope we can find good heuristics using screen size. How about setting thumbnail width to the width of the screen? Note that width changes when rotating the screen. Let's not worry about niche cases like split screen. |
I agree with this. It may not be the best quality, but IMO people who are wanting to view pictures in ultra high res are probably not going to be doing it on their phone anyway. :) |
@misaochan Yes, I recently added a click event for the POTD where a user who is interested in the photo can click on it and know more about it. |
The full image should only be downloaded when the user clicks to view the image. Not when just displaying a thumbnail of it in a widget or other activity such as Explore. |
I just found out that
|
As per the current code base, even on clicking the image, the media detail view shows the 640 width image as Going forward,
|
Summary:
Today's POTD is massive, which causes max parcel memory limit to be exceeded.
https://upload.wikimedia.org/wikipedia/commons/c/cb/Attacus_taprobanis-Kadavoor-2018-07-13-001.jpg
It would be good to get a smaller version of the file to avoid this.
The text was updated successfully, but these errors were encountered: