Page MenuHomePhabricator

When uploading an image confirmation page loads image in full resolution
Closed, ResolvedPublic

Description

Instead lets show a scaled down version that loads faster


Version: unspecified
Severity: normal

Details

Reference
bz38343

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:08 AM
bzimport set Reference to bz38343.
bzimport added a subscriber: Unknown Object (MLST).

The response has a url to the full size image but as far as I can see it's not clear how to deduce the thumbnail url from it...

AS far as it is done by the mobile app, you can cheat and compute the url, knowing that wmf servers will render it on demand.

The url will be like: http://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Lake_Bondhus_Norway_2862.jpg/600px-Lake_Bondhus_Norway_2862.jpg

Where 600px- is the thumbnail resolution (must be less than the image dimensions). e/e9 come from the two first characters of the filename md5.

Thanks Platonides! I think this does the right think - Can you review this?:
https://github.com/jdlrobson/WLMMobile/pull/new/thumb38343

?