Page MenuHomePhabricator

Page Previews is allowed to show non-free images
Closed, ResolvedPublic

Description

Background

Page Previews will be allowed to display free and non-free images whereas the PageImages API should only be returned free images by default – even though this isn't the case at the moment, we should assume that it's going to be when we start to roll out Page Previews.

Using the new API (see T123445: Add support for RESTBase endpoint consumption), Page Previews will request images which are non-free as well as free images.

Story

As a user who is viewing a preview for any Star Wars related content, I want to see an image that is relevant to the content I am viewing rather than an unrelated photo of something like one of the filming locations so that I can understand more about the topic quicker

Acceptance Criteria

  • The RESTBase page summary API returns non-free images (as always)
  • Related Pages, for example, returns free images only.
  • Notify apps teams on changes to RESTBase

Event Timeline

ovasileva renamed this task from Allow hovercards to display non-free images to Add support to allow PageImages to be filtered by license (free/non-free).Oct 5 2016, 4:38 PM
ovasileva updated the task description. (Show Details)

cc/ @phuedx @Jdlrobson @MaxSem

Is it feasible to add a rights param to the pageimages api to allow querying by non-free free or free?

The idea is that hovercards has aproval for getting non-free images but other extensions like related articles don't, so we need to have a way on the same wiki to query pageimages specifying all images or just free.

ovasileva triaged this task as Medium priority.Oct 5 2016, 4:38 PM

the only issue I can see is that for some pages we will need to calculate and store 2 page image properties for roughly 18% of pages [1] (free and nonfree). We can then add an api parameter to express a preference.

Given a page property is a title this doesn't seem like a big storage issue to me.

[1] https://phabricator.wikimedia.org/T125977#2004449

Also please merge or reword to be Hovercards specific. This request has been captured in T131105 for some time so let's not fragment the conversation.

@Jdlrobson - I think it's possible for the two to be merged. Or rather, what we want is to:

  1. do T131105: Pageimages should return both free and non-free images with 'free-ness' denoted as a property (merge or track there)
  2. set non-free for all features, set free for hovercards (merge or track separately in this card)

@ovasileva - to update specifically for hovercards

Jdlrobson renamed this task from Add support to allow PageImages to be filtered by license (free/non-free) to Hovercards is allowed to show non-free images.Oct 20 2016, 7:45 PM
Jdlrobson updated the task description. (Show Details)
ovasileva raised the priority of this task from Medium to High.Dec 1 2016, 2:19 PM
ovasileva renamed this task from Hovercards is allowed to show non-free images to Page Previews is allowed to show non-free images.Jan 18 2017, 1:03 AM
ovasileva added a project: Services.
ovasileva updated the task description. (Show Details)
ovasileva edited subscribers, added: Fjalapeno; removed: MaxSem.

I met with @mobrovac and @Pchelolo today and informed 'em that Reading Web would be updating the PageImages API to return free images by default (see T152216: Return free images by default) and, consequently, they'd have to update the page summary definition to include pilicense=any in the internal PageImages API call.

And I've created a PR to add it: https://github.com/wikimedia/restbase/pull/741

This has been merged and deployed, so you can go ahead and start using RB's summary endpoint.

phuedx claimed this task.