Allimages

This is an example of using JavaScript with AJAX to query the allimages API and put the results in a sortable table. The URL (see JavaScript section below) being used is:

(localwiki) + /api.php?action=query&list=allimages&ailimit=1000&aiprop=size&format=json


 * &format=json is used in the URL to put the information into JavaScript Object Notation (JSON) format so that it can be used with JavaScript
 * 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.

API information
See http://mathmagician.wikia.com/api.php for information about the API --- --- --- --- --- --- --- --- --- --- --- --- Query: List  --- --- --- --- --- --- --- --- --- --- --- ---

Enumerate all images sequentially
 * list=allimages (ai) *

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