Open main menu

Extension:FileInfo

MediaWiki extensions manual
OOjs UI icon advanced.svg
FileInfo
Release status: experimental
Implementation Parser function
Author(s) Brion Vibber (Brion VIBBERtalk)
License No license specified
Download Template:WikimediaDownload/svn
Translate the FileInfo extension if it is available at translatewiki.net
Check usage and version matrix.

Stub FileInfo extension copied from my personal wiki; implements a {{#filesize}} that pretty-prints the download size of an original uploaded file. Should get expanded to query other things like dimensions and types, would be handy for some uses.

See alsoEdit

The REST API's imageinfo query has similar properties; probably wise to match at least some of them:

 iiprop              - 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
                        archivename   - Adds the file name of the archive version for non-latest versions
                        bitdepth      - Adds the bit depth of the version
                       Values (separate with '|'): timestamp, user, userid, comment, parsedcomment, url, size, dimensions, sha1, mime, thumbmime,
                           mediatype, metadata, archivename, bitdepth
                       Default: timestamp|user