Extension:Proofread Page/API:imageforpage

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>">
<translate> ≥</translate> 1.40
<translate> MediaWiki version:</translate>

The ProofreadPage extension provides[1] information about URLs to images for a given page in the "Page:" namespace with the query+props=imageforpage query:

{
    "action": "query",
    "format": "json",
    "prop": "imageforpage",
    "titles": "Page:Sandbox.djvu/1",
    "formatversion": "2"
}

Example: https://en.wikisource.org/wiki/Special:ApiSandbox#action=query&format=json&prop=imageforpage&titles=Page%3ASandbox.djvu%2F1&formatversion=2

{
    "batchcomplete": true,
    "query": {
        "pages": [
            {
                "pageid": 941671,
                "ns": 104,
                "title": "Page:Sandbox.djvu/1",
                "imagesforpage": {
                    "thumbnail": "//upload.wikimedia.org/wikipedia/commons/thumb/9/92/Sandbox.djvu/page1-900px-Sandbox.djvu.jpg",
                    "size": 900,
                    "filename": "Sandbox.djvu",
                    "responsiveimages": {
                        "1.5": "//upload.wikimedia.org/wikipedia/commons/thumb/9/92/Sandbox.djvu/page1-1350px-Sandbox.djvu.jpg",
                        "2": "//upload.wikimedia.org/wikipedia/commons/thumb/9/92/Sandbox.djvu/page1-1800px-Sandbox.djvu.jpg"
                    },
                    "fullsize": "//upload.wikimedia.org/wikipedia/commons/thumb/9/92/Sandbox.djvu/page1-1516px-Sandbox.djvu.jpg"
                }
            }
        ]
    }
}


Parameters

See https://en.wikisource.org/w/api.php?action=help&modules=query%2Bimageforpage"


Notes

  1. From 1.40.wmfxxx (phab:Txxxxx)