Retrieve information from MediaWiki image pages, like the actual image file URL and EXIF metadata.
On entities with URL relationship types that represent images,
this extension will find those URLs that appear to be MediaWiki image pages, and
use the MediaWiki API to fetch information about the image. This information
will include the actual file URL, so you can use it as the src
in an <img>
tag (for example).
MediaWiki image URLs are assumed to be those with a path that starts with
/wiki/Image:
or /wiki/File:
.
This extension uses its own cache, separate from the MusicBrainz loader cache.
This extension can be configured using environment variables:
MEDIAWIKI_CACHE_SIZE
: The number of items to keep in the cache. Defaults toGRAPHBRAINZ_CACHE_SIZE
if defined, or8192
.MEDIAWIKI_CACHE_TTL
: The number of seconds to keep items in the cache. Defaults toGRAPHBRAINZ_CACHE_TTL
if defined, or86400000
(one day).
Table of Contents
🔹 This type has been extended. See the base schema for a description and additional fields.
Field | Argument | Type | Description |
---|---|---|---|
mediaWikiImages | [MediaWikiImage]! |
Artist images found at MediaWiki URLs in the artist’s URL relationships. Defaults to URL relationships with the type “image”. This field is provided by the MediaWiki extension. |
|
type | String |
The type of URL relationship that will be selected to find images. See the possible Artist-URL relationship types. |
🔹 This type has been extended. See the base schema for a description and additional fields.
Field | Argument | Type | Description |
---|---|---|---|
mediaWikiImages | [MediaWikiImage]! |
Instrument images found at MediaWiki URLs in the instrument’s URL relationships. Defaults to URL relationships with the type “image”. This field is provided by the MediaWiki extension. |
|
type | String |
The type of URL relationship that will be selected to find images. See the possible Instrument-URL relationship types. |
🔹 This type has been extended. See the base schema for a description and additional fields.
Field | Argument | Type | Description |
---|---|---|---|
mediaWikiImages | [MediaWikiImage]! |
Label images found at MediaWiki URLs in the label’s URL relationships. Defaults to URL relationships with the type “logo”. This field is provided by the MediaWiki extension. |
|
type | String |
The type of URL relationship that will be selected to find images. See the possible Label-URL relationship types. |
An object describing various properties of an image stored on a MediaWiki server. The information comes the MediaWiki imageinfo API.
Field | Argument | Type | Description |
---|---|---|---|
url | URLString! |
The URL of the actual image file. |
|
descriptionURL | URLString |
The URL of the wiki page describing the image. |
|
user | String |
The user who uploaded the file. |
|
size | Int |
The size of the file in bytes. |
|
width | Int |
The pixel width of the image. |
|
height | Int |
The pixel height of the image. |
|
canonicalTitle | String |
The canonical title of the file. |
|
objectName | String |
The image title, brief description, or file name. |
|
descriptionHTML | String |
A description of the image, potentially containing HTML. |
|
originalDateTimeHTML | String |
The original date of creation of the image. May be a description rather than a parseable timestamp, and may contain HTML. |
|
categories | [String]! |
A list of the categories of the image. |
|
artistHTML | String |
The name of the image author, potentially containing HTML. |
|
creditHTML | String |
The source of the image, potentially containing HTML. |
|
licenseShortName | String |
A short human-readable license name. |
|
licenseURL | URLString |
A web address where the license is described. |
|
metadata | [MediaWikiImageMetadata]! |
The full list of values in the |
An entry in the extmetadata
field of a MediaWiki image file.
Field | Argument | Type | Description |
---|---|---|---|
name | String! |
The name of the metadata field. |
|
value | String |
The value of the metadata field. All values will be converted to strings. |
|
source | String |
The source of the value. |
🔹 This type has been extended. See the base schema for a description and additional fields.
Field | Argument | Type | Description |
---|---|---|---|
mediaWikiImages | [MediaWikiImage]! |
Place images found at MediaWiki URLs in the place’s URL relationships. Defaults to URL relationships with the type “image”. This field is provided by the MediaWiki extension. |
|
type | String |
The type of URL relationship that will be selected to find images. See the possible Place-URL relationship types. |