Page MenuHomePhabricator

Pictures unrelated to article directly shouldn't be shown in article preview
Open, Needs TriagePublic

Description

The pictures found in 'See also' section aren't related to the article and thus they shouldn't be shown in a preview.

Steps to reproduce

  1. Go to the Pascal (programming language) article
  2. Tap on imperative which is a link to Imperative programming

Expected results
The image found in a 'See also' section isn't shown in link preview

Actual results
The image found in the 'See also' section (an image that identifies the portal to which the page belongs) is shown in link preview.

Screen shots

Environments observed
App version : alpha (29-08-2017)
Android version : 4.3
Device vendor : Samsung
Device model : GT-I9300

Event Timeline

Kaartic created this task.Aug 30 2017, 2:18 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 30 2017, 2:18 PM
Kaartic updated the task description. (Show Details)Aug 30 2017, 2:20 PM
Dbrant added a subscriber: Dbrant.

This list of images comes from the PageImages extension, and is not specific to the app.

Jdlrobson added a subscriber: Jdlrobson.

Can you verify this in android app?

This page has no page image
https://en.m.wikipedia.org/wiki/Imperative_programming?action=info

Might be an issue on services layer but issue is not ikn PageImages extension or mediawiki api

bearND added a subscriber: Tgr.Sep 13 2017, 11:12 AM
Mholloway added a subscriber: Mholloway.EditedNov 11 2017, 5:37 AM

This doesn't involve MCS, it's a straight MediaWiki API call. Using generator=images for this page[1] picks up the image used as an icon for the computer science portal badge, and that image meets our quality criteria for inclusion in a gallery collection.

I'm not really convinced this is a bug. If it is one, the relevant project would be MediaWiki-API. (API query generators, including "images," are functionality provided by MW core and not PageImages.)

[1] https://en.wikipedia.org/w/api.php?action=query&format=json&formatversion=2&prop=imageinfo&generator=images&converttitles=&redirects=&iiprop=dimensions|mime|url&iiurlwidth=320&iiurlheight=320&titles=Imperative_programming

That said, the new MCS media API (T177430) could help out here when it's launched. Our aim is to include indicators of the usage of the various images on the page in such a way as to allow filtering stuff like this out.

Tgr added a comment.Nov 11 2017, 6:49 PM

Probably the behavior built into MediaViewer should be duplicated here. (Related: T75902)

bearND added a subscriber: bearND.Nov 15 2017, 5:36 AM

@Mholloway I'm not yet convinced that we should add more items than a normal client would want to show. This would require all regular clients to add filtering code. I think instead the media client should already filter out the media items in a similar fashion as done by the MediaViewer.

Mholloway added a comment.EditedNov 15 2017, 1:44 PM

@Mholloway I'm not yet convinced that we should add more items than a normal client would want to show. This would require all regular clients to add filtering code. I think instead the media client should already filter out the media items in a similar fashion as done by the MediaViewer.

I'm taking that as a product requirement per T177430:

Images that are too small for the gallery
We should return ALL images in this response. Even those that are too small for the gallery. (images used for chrome, icons, etc…)

I guess we can still discuss that over there. I think there's some discussion that this API could end up with a similar structure as PCS page HTML, with a base layer returning all media items and a thin per-client layer applying custom filtering logic.

@Mholloway has this been addressed in your Media API work

I believe so. The /page/media response for the case in the task description does not include the offending image, as it's been filtered: https://en.wikipedia.org/api/rest_v1/page/media/Imperative_programming. This issue should go away when the Android app incorporates the new /page/media endpoint.

Here is a long list of images that are often used as stub/portal/etc icons, and can thus be considered as unrelated to the topic of the article: https://www.wikidata.org/w/index.php?title=User:Magnus_Manske/FIST_icons&action=raw
It is kept up-to-date by FIST/WDFIST users, including me :-)