Thread:Project:Support desk/MediaWiki API: how do you get the max image width with piprop and pithumbsize ?

Hello,

I am the creator of a clojure wrapper around the mediawiki /w.api.php API that allows for the generation of json document from different (media)wiki pages url. When querying the API, I use piprop=thumbnail to get the url of a page thumbnail. By default, I would like to get the url of the image having the original size. For the moment, the only way I found to do this is give the pithumbsize an arbitrarily large number (e.g: 99999) and the link will be that of the full size image. However, the query result indicates wrong width and height. Is there a better way to do this? Is there a way to query the API and have it return a link to the full size thumbnail of the page without the large number hack?

I'm currently using this endpoint : [| en.wikipedia.org/w/api.php]

Thank you so much for your help !