Extension:IIIF
Release status: stable |
|
|---|---|
| Implementation | API, Parser function, User interface, ContentHandler |
| Description | API services and other tools for working with IIIF. |
| Latest version | 1.3 (2026-08-01) |
| MediaWiki | 1.43 |
| PHP | 8 |
| Licence | GNU General Public License 2.0 or later |
| Download | GitHub:
Note: README |
The IIIF extension offers a number of API services and associated tools for working with IIIF (International Image Interoperability Framework), such as integrating annotations, creating collections and using image files from MediaWiki sites. It includes an image annotation tool based on OpenSeadragon and Annotorious, a tool to create a table of contents that can be merged as ‘Ranges’ into a IIIF Manifest and an implementation of TIFY to let users view IIIF resources. It supports integration with Semantic MediaWiki and comes with two semantic result formats for visualising annotations.
Installation
[edit]- Download and place the file(s) in a directory called
IIIFin yourextensions/folder. - Only when installing from Git, run Composer to install PHP dependencies, by issuing
composer install --no-devin the extension directory. (See T173141 for potential complications.) - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'IIIF' );
Done – Navigate to Special:Versionon your wiki to verify that the extension is successfully installed.
Recommended extensions
[edit]Extensions recommended for use with the IIIF extension include:
- ReconciliationAPI - adds autocompletion to your form inputs
- Mirador - IIIF image viewer
- WSSlots - lets you save JSON data for the annotation tool or TOC creator to a content slot
- TemplateFunc and Scribunto - both extensions let you take advantage of JSON data you have saved with said tools
- Semantic MediaWiki
- CodeEditor
- Admin Links
IIIF
[edit]IIIF (International Image Interoperability Framework) refers to a set of open web standards for delivering digital resources, such as images and audio/visual files, along with their metadata. Adopted across the GLAM sector and perhaps further afield, it has significantly contributed to the dissemination of cultural heritage assets in digital form and to engagement with them in research and education. Central to IIIF standards is a set of APIs, notably the Presentation API and Image API. This extension focuses on the implementation of IIIF APIs within the MediaWiki context as well as tools that can make use of them. See the IIIF website for a general introduction and further information.
Usage
[edit]The most up to date and detailed guide on usage and configuration is included with the extension on the special page Special:IIIF. Alternatively, visit the version of the guide that is available from CODECS, even though it may reflect slightly more recent developments. A tech blog about the first steps of development can be found on https://codecs.vanhamel.nl/Show:Lab/IIIF.
Features in a nutshell
[edit]- Parser functions :
#iiif-annotator- lets you enable an image annotation tool on a wiki page. Users can then create Annotations, which are stored as JSON in a wiki page. In 'view only' mode, the same parser function can be used to exhibit the IIIF resource in the viewer and the Annotations that were created for it. JSON schemas can be used to let you create forms for use with the annotator and set up models for displaying the data. Without a JSON schema, the tool defaults to using a textarea with 'description' as the name of the input.#iiif-annotator-data- lets you reuse Annotation data by sending them to a wiki template. This can be useful, for instance, if you want to store Annotations through Semantic MediaWiki's#subobjectformat.#iiif-tify- lets you use the TIFY viewer to load a Manifest.#iiif-toc- lets you build a table of contents for a IIIF resource, or create one in standalone mode if no such resource is available. Again, as with the annotation tool, JSON schemas can be used to create forms. Data produced with this tool is stored as JSON and can be converted to IIIF's Ranges using theiiif-rangeAPI module.#iiif-get-canvases- convenience function for retrieving structured information about canvas items.#iiif-manifest-from-smwquery- accepts some basic SMW query arguments to gather files from the wiki and returns a Manifest URL (Presentation API v3) that can be used in a IIIF viewer.
- Result formats for Semantic MediaWiki :
iiif-canvas-viewer- uses the OpenSeadragon/Annotorious image viewer to show annotated canvases.iiif-annotation-gallery- creates a gallery of image crops matching the annotated regions. A lightbox-type viewer is used to reveal larger images and details.
- A set of API modules :
iiif-manifest- takes a Manifest URL and the wiki page for which Semantic MediaWiki data have been created, and returns a new IIIF Manifest in which those data have been merged as Annotations.iiif-annotations- auxiliary service foriiif-manifestthat returns Annotations as AnnotationPage (v3) or sc:AnnotationList (v2), or if 'dest' is set to 'localstorage', as a LocalStorageService.iiif-mw-pres- implements the IIIF Presentation API using the MediaWiki file system. It supports image files (level 0, tileless, pyramidically sized) from the local MediaWiki repository as well as from external repositories such as Wikimedia Commons.iiif-mw-img- auxiliary service used byiiif-mw-presto obtain Image Information Requests (v2 and v3).iiif-collection- lets you create a IIIF Collection, i.e. a collection of IIIF Manifests, on the basis of a Semantic MediaWiki query. The configuration for the query can be set in LocalSettings or in a wiki page referenced by thesmwconfigURL parameter.iiif-wiki- returns the JSON content of a wiki page in the IIIF namespace. For instance, if a parser function accepts a Manifest URL and that Manifest is stored on a wiki page, the API's URL address would be a convenient identifier.iiif-range- Special:IIIFServ - special page for redirecting a web request to the relevant API module.
- A JSON namespace with the prefix
IIIFfor storing configuration data, Manifests and Annotations.
Examples
[edit]- Annotation tool
Uses the #iiif-annotator parser function

#iiif-annotator-data. - TOC creator (introduced in v1.0)
Uses the #iiif-toc parser function

See also
[edit]- Stable extensions
- API extensions
- Parser function extensions
- User interface extensions
- ContentHandler extensions
- ParserFirstCallInit extensions
- BeforePageDisplay extensions
- AdminLinks extensions
- ContentHandlerDefaultModelFor extensions
- ListDefinedTags extensions
- ChangeTagsListActive extensions
- ChangeTagsAllowedAdd extensions
- CodeEditorGetPageLanguage extensions
- GPL licensed extensions
- Extensions in GitHub version control
- All extensions
- Extensions requiring Composer with git
- Media handling extensions
- Annotation extensions
- Semantic MediaWiki extensions
