Page MenuHomePhabricator

PageImages display the wrong image
Closed, DuplicatePublic

Assigned To
None
Authored By
Akeron
Apr 11 2015, 2:14 PM
Referenced Files
F4174695: Simulator Screen Shot Jun 17, 2016, 1.49.52 PM.png
Jun 17 2016, 12:50 PM
F4174678: pasted_file
Jun 17 2016, 12:50 PM
F4174687: pasted_file
Jun 17 2016, 12:50 PM
F4031846: Simulator Screen Shot May 19, 2016, 9.50.20 PM.png
May 24 2016, 4:01 PM
F4031866: pasted_file
May 24 2016, 4:01 PM
F4031844: Simulator Screen Shot May 19, 2016, 9.50.34 PM.png
May 24 2016, 4:01 PM

Description

Pagesimages fails to find the good image in those examples :
https://en.wikipedia.org/w/index.php?title=Troy_McClure&action=info
https://en.wikipedia.org/w/index.php?title=Professor_Frink&action=info
https://en.wikipedia.org/w/index.php?title=Moe_Szyslak&action=info

Maybe a ratio configuration change will be enough ?
Width/height ratio :
File:Troymcclure.png : 0.53
File:Frink.png : 0.49
File:Moe_Szyslak.png : 0.55

Event Timeline

Akeron raised the priority of this task from to Medium.
Akeron updated the task description. (Show Details)
Akeron added a project: PageImages.
Akeron subscribed.
Aklapper lowered the priority of this task from Medium to Low.Apr 13 2015, 9:31 AM

Another obvious example on Flag of France : https://fr.wikipedia.org/wiki/Drapeau_de_la_France
PageImage choose https://commons.wikimedia.org/wiki/File:Royal_Standard_of_the_King_of_France.svg instead of https://commons.wikimedia.org/wiki/File:Flag_of_France.svg
This is strange because the chosen image is very far from top and the English article doesn't have this problem.

PageImage is actually used on mobile version for search, try searching "Drapeau de la France" on https://fr.m.wikipedia.org/w/index.php?search= the wrong image will be displayed in the pop-up menu.

per @dr0ptp4kt - citing T135755: Map showing as lead image on mobile app articles about certain building instead of an lead image of the actual building is another case where lead image is not showing the best image for the article.

I have noticed this is on 3 separate articles (Empire State, Flatiron and Chrysler buildings) where there is a map image as well as the intended lead image in the info box. Note this is occurring on both iOS and Android apps.

Steps to reproduce:

  1. Search for article "Empire State building" -
  2. Select to view the article. Note that the lead image is showing as the map.

Actual:
Both the search result thumb img and lead image in the Empire State building article is showing a map of NYC

Simulator Screen Shot May 19, 2016, 9.50.34 PM.png (1×750 px, 197 KB)

Simulator Screen Shot May 19, 2016, 9.50.20 PM.png (1×750 px, 392 KB)

Expected:
Lead image should be a photograph of the building as it is on the web.

pasted_file (580×608 px, 262 KB)

+ Another example – Henry VIII article showing supplementary image as the lead image on mobile app article view, and on Search thumbnails.

EXPECTED:
Lead image is the first image in the info box, a portrait of Henry VIII as per web view of article

pasted_file (601×1 px, 401 KB)

ACTUAL:
Search thumbnail on mobile web

pasted_file (560×930 px, 95 KB)

Lead image on iOS app

Simulator Screen Shot Jun 17, 2016, 1.49.52 PM.png (1×750 px, 196 KB)

Akeron renamed this task from Improve Pageimages image selection (ratio ?) to PageImage display the wrong image.Sep 4 2016, 12:00 PM

The problem seems related to images with a larger height compared to width :

There is a lot of example of PageImage fails with film poster :
https://en.wikipedia.org/w/index.php?title=The_Godfather&action=info
https://en.wikipedia.org/w/index.php?title=The_Silence_of_the_Lambs_%28film%29&action=info
https://en.wikipedia.org/w/index.php?title=Forrest_Gump&action=info
https://en.wikipedia.org/w/index.php?title=Reservoir_Dogs&action=info
https://en.wikipedia.org/w/index.php?title=Avatar_%282009_film%29&action=info
https://en.wikipedia.org/w/index.php?title=Taxi_Driver&action=info
https://en.wikipedia.org/w/index.php?title=Fight_Club&action=info
https://en.wikipedia.org/w/index.php?title=Jaws_%28film%29&action=info
https://en.wikipedia.org/w/index.php?title=Argo_%282012_film%29&action=info
https://en.wikipedia.org/w/index.php?title=The_Social_Network&action=info
https://en.wikipedia.org/w/index.php?title=North_by_Northwest&action=info
https://en.wikipedia.org/w/index.php?title=The_Hunger_Games_%28film%29&action=info
https://en.wikipedia.org/w/index.php?title=Spider-Man_%282002_film%29&action=info
https://en.wikipedia.org/w/index.php?title=Raging_Bull&action=info
https://en.wikipedia.org/w/index.php?title=Spider-Man_2&action=info
https://en.wikipedia.org/w/index.php?title=The_Hunger_Games:_Catching_Fire&action=info
https://en.wikipedia.org/w/index.php?title=The_Conjuring&action=info
https://en.wikipedia.org/w/index.php?title=Lincoln_%282012_film%29&action=info
https://en.wikipedia.org/w/index.php?title=The_Curious_Case_of_Benjamin_Button_%28film%29&action=info
https://en.wikipedia.org/w/index.php?title=Man_of_Steel_%28film%29&action=info
https://en.wikipedia.org/w/index.php?title=Howl%27s_Moving_Castle_%28film%29&action=info
https://en.wikipedia.org/w/index.php?title=King_Kong_%282005_film%29&action=info
https://en.wikipedia.org/w/index.php?title=Die_Hard&action=info
https://en.wikipedia.org/w/index.php?title=12_Monkeys&action=info
https://en.wikipedia.org/w/index.php?title=American_History_X&action=info
https://en.wikipedia.org/w/index.php?title=Little_Miss_Sunshine&action=info
https://en.wikipedia.org/w/index.php?title=Philadelphia_%28film%29&action=info
https://en.wikipedia.org/w/index.php?title=District_9&action=info
https://en.wikipedia.org/w/index.php?title=Prometheus_%282012_film%29&action=info
https://en.wikipedia.org/w/index.php?title=Mad_Max&action=info
https://en.wikipedia.org/w/index.php?title=X2_%28film%29&action=info
https://en.wikipedia.org/w/index.php?title=The_Simpsons_Movie&action=info
https://en.wikipedia.org/w/index.php?title=The_Fighter&action=info

It also can fail with image in landscape format, maybe because it is too small :
https://en.wikipedia.org/w/index.php?title=Another_World_%28TV_series%29&action=info

Akeron renamed this task from PageImage display the wrong image to PageImages display the wrong image.Sep 4 2016, 12:24 PM
Akeron raised the priority of this task from Low to Medium.

This bug affects a lot of articles and should be easy to fix.

The extension should always take the first image and skip only very small images or images with extreme height/width ratio.