Well, apparently so... but Special:ExtensionDistributor advises that "Most extensions work across multiple versions of MediaWiki, so if your MediaWiki version is not here, or if you have a need for the latest extension features, try using the current version.", so I thought the 1.32 version was worth a try. I considered using an even more advanced release, but that would probably have been even worse.
Extension:PageImages#How are images scored? talks about how images are scored relative to each other, including size, but it only discusses scoring of exact sizes (and aspect ratios) on Wikimedia projects. It does not say what the default settings are. As for the lead section, Extension:PageImages#How does it select images? says "If $wgPageImagesLeadSectionOnly is true, only images in the lead section will be considered. Currently it is true for only Wikipedia projects, all other projects can pull images from outside the lead."
Because the default settings are not described, I looked at the source code, making sure I had the 1.31 branch because that's what I'm currently running. (I have not configured any custom settings.) The extension.json file appears to contain the default values for $wgPageImagesScores and $wgPageImagesLeadSectionOnly. The default for the latter is true
. The default for the former is:
"PageImagesScores": {
"value": {
"position": [
8,
6,
4,
3
],
"width": {
"@doc119": "Very small images are usually from maintenace or stub templates",
"119": -100,
"400": 10,
"@doc600@": "Larger images are panoramas, less suitable",
"600": 5,
"601": 0
},
"galleryImageWidth": {
"99": -100,
"100": 0
},
"ratio": {
"3": -100,
"5": 0,
"20": 5,
"30": 0,
"31": -100
}
}
},
This means that "images smaller than 119 pixels are weighted highly negatively" is actually the default behavior, not just the setting for Wikimedia projects. I do not understand what is meant by the settings for "position" (weights for the first four images?) and "ratio". Surely "20" doesn't mean that width divided by height = 20 (e.g. 20:1). However, I would expect that "only the first 4 images that appear in the document are considered" and "the best possible images are images where the height is half the width or the height is double the width. Any images for which the ratio is less than 0.5 will score negatively and be discarded" also describe the default behavior.
The main page on my wiki looks like this (the rest is private). It has no sections and one image. This image was an unsized (defaulting to 300px, as I haven't set $wgThumbLimits to anything else) thumbnail of a 400x400 image. I uploaded two test images and tried putting them on the main page instead of that image: one that is 400x800, and another that is 400x200, in keeping with the statement that a 2:1 or 1:2 image is best. These were both also unsized thumbnails. API queries with prop=pageimages
continued to return no image information for Main Page
. I also found that the database query select * from page_props where pp_propname = 'page_image';
returns nothing.
It appears that PageImages is simply not finding any images. I'd like some advice on why this could be the case.