Page MenuHomePhabricator

PageImages does not find image from infobox
Closed, ResolvedPublic

Description

As shown by the query below, PageImages does not seem to find the image from the article's infobox.

https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&titles=Kristina%20Savitskaya&pithumbsize=100

{
    "batchcomplete": "",
    "query": {
        "pages": {
            "36621625": {
                "pageid": 36621625,
                "ns": 0,
                "title": "Kristina Savitskaya"
            }
        }
    }
}

Another example: https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&titles=McCrone%20Research%20Institute&pithumbsize=100

For comparison, here is what the JSON looks like when an image is found:

https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&titles=Star%20Trek%20planet%20classification&pithumbsize=100

{
    "batchcomplete": "",
    "query": {
        "pages": {
            "160025": {
                "pageid": 160025,
                "ns": 0,
                "title": "Star Trek planet classification",
                "thumbnail": {
                    "source": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/97/The_Earth_seen_from_Apollo_17.jpg/100px-The_Earth_seen_from_Apollo_17.jpg",
                    "width": 100,
                    "height": 100
                },
                "pageimage": "The_Earth_seen_from_Apollo_17.jpg"
            }
        }
    }
}

Infobox images are always very relevant, and probably the best image to take from any given article. So PageImages should use them.

Event Timeline

Jdlrobson claimed this task.
Jdlrobson added a project: Web-Team-Backlog.
Jdlrobson subscribed.

Per the selection algorithm, being in the lead is not enough to be chosen as the page image. We consider various things to ensure that the selected image is appropriate for how it is used:
https://www.mediawiki.org/wiki/Extension:PageImages#How_does_it_select_images.3F

The image being pointed to is 272 × 770 pixels.
Here the ratio is 0.35 which is less than the minimum of 0.5 for consideration.

The algorithm is configurable, via a change to PageImagesScores and a Wikimedia-Site-requests
However, I do not recommend this, it would lead to some poor quality image choices and all clients would need to be considered on that wiki and would likely need to be updated to be able to deal with images that are portrait.