Page MenuHomePhabricator

Modify iOS Explore cells to use thumbnail urls which match cell image presentation sizes (featured, most read and news sections)
Closed, ResolvedPublic

Description

Background:

See the "Chandra Bose" cell below ( From: https://en.wikipedia.org/api/rest_v1/feed/featured/2016/12/01 ):

The problem is the iOS app is only *displaying* the Bose icon at 40x40 pixels.

But we are fetching the following 17K 240px icon:

We really only need to be fetching the following 1K 40px icon:

Fetching 17K when 1K would suffice may not seem like much, but most of the smaller icons in the iOS feed have the same issue, so the effect is compounded.

Solution:

Once the parent ticket is complete the feed will provide canonical image info for the "tfa", "mostread", and "news" sections images. Then we can safely request exactly needed resolutions because we'll know the max resolution. ( the thumbnailer doesn't like it if you request a width >= the canonical width )

More specifically, we can take the new canonical image url from the feed query results and pass it to WMFChangeImageSourceURLSizePrefix with a retina adjusted size from UIScreen+WMFImageWidth to get images which actually fit.

Event Timeline

Mhurd created this task.Dec 2 2016, 1:35 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 2 2016, 1:35 AM
Mhurd renamed this task from Modify Explore feed image urls to request the precisely needed image size to Modify Explore feed thumbnail urls to request the precisely needed image size.Dec 2 2016, 1:49 AM
Mhurd renamed this task from Modify Explore feed thumbnail urls to request the precisely needed image size to Modify Explore feed thumbnail urls to request the precisely needed image sizes for featured, most read and news sections.
Mhurd renamed this task from Modify Explore feed thumbnail urls to request the precisely needed image sizes for featured, most read and news sections to Modify iOS Explore feed thumbnail urls to request the precisely needed image sizes for featured, most read and news sections.
Mhurd renamed this task from Modify iOS Explore feed thumbnail urls to request the precisely needed image sizes for featured, most read and news sections to Modify iOS Explore feed thumbnail urls to request precisely needed image sizes for featured, most read and news sections.
Mhurd updated the task description. (Show Details)
Mhurd updated the task description. (Show Details)Dec 2 2016, 1:51 AM
Mhurd renamed this task from Modify iOS Explore feed thumbnail urls to request precisely needed image sizes for featured, most read and news sections to Modify iOS Explore cells to use thumbnail urls which match cell image presentation sizes (featured, most read and news sections).Dec 2 2016, 1:54 AM
JMinor triaged this task as Medium priority.Dec 5 2016, 11:22 PM
JoeWalsh claimed this task.Apr 19 2017, 2:47 PM
JoeWalsh added a subscriber: JoeWalsh.

Bringing this into 5.4.1 since the thumbnail code is in flux and it was easy to pickup while completing other fixes.

JMinor closed this task as Resolved.May 3 2017, 4:42 PM