Migrated from: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/473
Currently we fire an API request every time the user changes the selection on the embed or download size menu (and then have to deal with showing a sane UI while we are still waiting for the information).
We should just request all sizes when the panel is opened (or, as long as we use constant sizes for all files, we could even pack it into the original imageinfo request) and be done with it.
Acceptance criteria
- add a new iiurlwikitextparameter to the imageinfo API; it should take a list of option strings (as expected by Parser::makeImage - in other word, a set of parameters from the wikicode of an image, in the form120px|lang=en|page=2) separated by ||
- imageinfo should generate an URL for each option string
- the URLs should be returned as children of the imageinfo node:
<ii url="..." descriptionurl=" . ..">
<iithumb url=" [[https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Example.jpg/194px-Example.jpg | .]] .." width="..." height=".." /> ...
</ii></pre>
Related bugs
https://bugzilla.wikimedia.org/show_bug.cgi?id=54035 API imageinfo should allow fetching multiple thumbnail sizes