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 ):

Screen Shot 2016-12-01 at 4.52.04 PM.png (1×862 px, 237 KB)

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

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

Jagadish_Chandra_Bose_1926.jpg (320×240 px, 16 KB)

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

Jagadish_Chandra_Bose_1926-1.jpg (53×40 px, 1 KB)

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 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 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
JoeWalsh subscribed.

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