Page MenuHomePhabricator

Create an API to get the lead image for an article
Closed, DeclinedPublic

Description

We need an API that returns the best possible lead image for an article for the device that the user is using, i.e. the lead image must be optimised for resolution and (assumed) bandwidth.

If the device's resolution is well known – or given by a hint, maybe? – then the API should return the lead image for both portrait and landscape orientations.

Event Timeline

phuedx raised the priority of this task from to Needs Triage.
phuedx updated the task description. (Show Details)
phuedx added a project: Web-Team-Backlog.
phuedx subscribed.
phuedx added a subscriber: GWicke.
phuedx added a subscriber: Services.

Would this just build on the prop=pageimages API action provided by PageImages or is there somehow a completely new need here? I'm not sure I understand how "optimised for resolution and (assumed) bandwidth" is a server side concern rather than attributes of the request that is sent for the content.

Would this just build on the prop=pageimages API action provided by PageImages or is there somehow a completely new need here?

I think we'll need to tinker with the PageImages extension a little but most I'd like to use PageImages.

I'm not sure I understand how "optimised for resolution and (assumed) bandwidth" is a server side concern rather than attributes of the request that is sent for the content.

You're right. This is something that the MobileFrontend extension is going to have to deal with, not the service. I was trying to capture how we're going to pick a lead image for a user accessing an article for the first time, i.e. with very little information about their device. We've got their UA, obvs, so we can make an educated guess.

Jdlrobson subscribed.

I don't believe we need this any more. We are not adding lead images to the mobile web experience and WikidataPageBanner provides a good encapsulation of the requirements and includes ways the editors can change it.