HomePhabricator

restbase: Use thumbnail when generating thumbnail

Authored by phuedx on Feb 28 2017, 2:28 PM.

Description

restbase: Use thumbnail when generating thumbnail

Rather than manipulating the URL of the original image to get the URL of
the appropriately sized thumbnail, manipulate the URL of the thumbnail
image.

While we could manipulate either the thumbnail or original image URL,
there are subtle differences between the two, so manipulating the latter
makes the generateThumbnailData function as simple as possible, e.g. we
don't have to splice in "/thumb" after "/commons".

Also, ensure that the thumbnail's dimensions are scaled appropriately.

Bug: T156800
Change-Id: I6825bad14b1131dc81f23dcf120cf8ffb7d7b4f6

Details

Committed
phuedxMar 1 2017, 3:41 PM
Parents
rEPOP5d4cc8d15a5d: Allow bucketing anons
Branches
Unknown
Tags
Unknown
References
refs/changes/13/340313/4
ChangeId
I6825bad14b1131dc81f23dcf120cf8ffb7d7b4f6