Extension:IIIF
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. Beginning with v0.3, it also provides an image annotation tool based on OpenSeadragon and Annotorious. Some of its features support integration with Semantic MediaWiki and in fact, v0.5 comes with two new result formats for visualising annotations.
The most up to date and detailed guide on usage and configuration is included with the extension on the special page Special:IIIF. A blog about initial development can be found on https://codecs.vanhamel.nl/Show:Lab/IIIF.
Installation
- 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.)Category:Extensions requiring Composer with git - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'IIIF' );
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Recommended extensions
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
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 can make use of them.
See the IIIF website for a general introduction and further information.
Usage
Once the extension is installed, a full guide is available from Special:IIIF.
Features in a nutshell
- 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.
- 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
- Annotation tool
Uses the #iiif-annotator parser function

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

