Expand all

ImageInfo

Constructor

new ImageInfo(api, [options]) #

Parameters:

Name Type Attributes Description
api mw.Api
options Object optional
Properties:
Name Type Attributes Default Description
language string optional
null

image metadata language

maxage number optional

cache expiration time, in seconds Will be used for both client-side cache (maxage) and reverse proxies (s-maxage)

Source:

Properties

iiextmetadatafilter #

Array of imageinfo extmetadata fields which are needed to construct an Image model.

Source:
Array of imageinfo extmetadata fields which are needed to construct an Image model.

iiprop #

Array of imageinfo API properties which are needed to construct an Image model.

Source:
Array of imageinfo API properties which are needed to construct an Image model.

Methods

get(file, [iiurlparam]) → {jQuery.Promise} #

Runs an API GET request to get the image info.

Parameters:

Name Type Attributes Description
file mw.Title
iiurlparam string optional

handler-specific parameter string (e.g. langde-800px for a multilingual SVG or page2-800px for a PDF page). When set, the returned thumbnail URLs (ImageModel#thumburls) are rendered as the same variant.

Returns:

a promise which resolves to an Image object.

Type
jQuery.Promise
Source:
Runs an API GET request to get the image info.

invalidate(file) #

Evict the entry of a given file from the cache.

Parameters:

Name Type Description
file mw.Title
Source:
Evict the entry of a given file from the cache.