| This is a test page. Anyone is free to use the code or examples on this page if they're at all helpful.|
For a full list of test pages on the Mathmagician Wiki, see Category:Test pages.
| Comment: http://community.wikia.com/wiki/Admin_Forum:List_of_images_by_file_size?
This example page is outdated. The demo on this page is now just a small fraction of the fully functional script that this prototype helped to create. See w:c:dev:ListFiles for the completed script!
(localwiki) + /api.php?action=query&list=allimages&ailimit=1000&aiprop=size&format=json
- To detect images of a minimum size of 1 MB, you would need to add &aiminsize=1000000 into the URL. In this example, I did not set the minimum file size because my test wiki here doesn't have any images larger than 1 MB.
- The script is not currently set up to detect differences between file types. e.g. videos will pop up in the results.
|Name||Size (bytes)||Width (px)||Height (px)|
See http://mathmagician.wikia.com/api.php for information about the API
--- --- --- --- --- --- --- --- --- --- --- --- Query: List --- --- --- --- --- --- --- --- --- --- --- --- * list=allimages (ai) * Enumerate all images sequentially This module requires read rights Parameters: aifrom - The image title to start enumerating from aito - The image title to stop enumerating at aiprefix - Search for all image titles that begin with this value aiminsize - Limit to images with at least this many bytes aimaxsize - Limit to images with at most this many bytes ailimit - How many images in total to return No more than 500 (5000 for bots) allowed Default: 10 aidir - The direction in which to list One value: ascending, descending Default: ascending aisha1 - SHA1 hash of image. Overrides aisha1base36 aisha1base36 - SHA1 hash of image in base 36 (used in MediaWiki) aiprop - What image information to get: timestamp - Adds timestamp for the uploaded version user - Adds the user who uploaded the image version userid - Add the user ID that uploaded the image version comment - Comment on the version parsedcomment - Parse the comment on the version url - Gives URL to the image and the description page size - Adds the size of the image in bytes and the height, width and page count (if applicable) dimensions - Alias for size sha1 - Adds SHA-1 hash for the image mime - Adds MIME type of the image thumbmime - Adds MIME type of the image thumbnail (requires url) mediatype - Adds the media type of the image metadata - Lists EXIF metadata for the version of the image bitdepth - Adds the bit depth of the version Values (separate with '|'): timestamp, user, userid, comment, parsedcomment, url, size, dimensions, sha1, mime, thumbmime, mediatype, metadata, bitdepth Default: timestamp|url aimime - What MIME type to search for. e.g. image/jpeg. Disabled in Miser Mode Examples: Show a list of images starting at the letter "B": api.php?action=query&list=allimages&aifrom=B Show info about 4 images starting at the letter "T": api.php?action=query&generator=allimages&gailimit=4&gaifrom=T&prop=imageinfo Help page: https://www.mediawiki.org/wiki/API:Allimages Generator: This module may be used as a generator