- https://www.mediawiki.org/wiki/Project:Sandbox?veaction=edit
- (in DevTools) Open the "Network" tab
- (in VisualEditor) Click "Insert" > "Images and media"
Actual
I noticed three issues:
- Ambigious parameters sent to the API.
- Invalid paramaters sent to the API.
- Results are low resolution on modern Retina/HiDPI screens.
The API request loooks ambigious:
https://commons.wikimedia.org/w/api.php?action=query&format=json&origin=*&generator=allimages&gaisort=timestamp&gaidir=descending&iiurlheight=200&iiprop=dimensions|url|mediatype|extmetadata|timestamp|user&prop=imageinfo&gaiuser=Krinkle&iiurlwidth[width]=320&iiurlwidth[height]=240&gailimit=15
Note how it sets:
- iiurlheight=200
- iiurlwidth[width]=320
- iiurlwidth[height]=240
There seems to some mixing of intentions and it is unclear which one is right or which one is meant to win. There are two possible heights, and two possilbe widths.
The latter two are invalid, and the response indicates this. The iiurlwidth accepts a single number, not a key-value structure.
{"batchcomplete":"","warnings":{"main":{"*":"Parameter \"iiurlwidth\" uses unsupported PHP array syntax."}}, …
The actual images in the results seem to render at 300x200 with the internal bitmap at 330px (this happens automatically via MediaWiki thumbnail steps). However, we seem to be ignoring the responsiveUrls.2 property, instead of feeding it to <img srcset=>.
{ "pageid": 4242400, "ns": 6, "title": "File:Scotiapiper.jpg", "imageinfo": [ { … "thumburl": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Scotiapiper.jpg/330px-Scotiapiper.jpg", "thumbwidth": 299, "thumbheight": 200, "responsiveUrls": { "2": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Scotiapiper.jpg/960px-Scotiapiper.jpg" }, …
Other information
The warning to detect invalid iiwidth parameters was introduced in 2014 via T66057: Using incorrect array parameter syntax does not raise an error/warning
