PHPackages                             islandora/islandora\_mirador - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. islandora/islandora\_mirador

Abandoned → [drupal/islandora\_mirador](/?search=drupal%2Fislandora_mirador)Drupal-module

islandora/islandora\_mirador
============================

Islandora support for Mirador viewer

2.4.0(1mo ago)3244.0k—0%121GPL-2.0-or-laterPHPCI passing

Since Sep 9Pushed 2mo ago13 watchersCompare

[ Source](https://github.com/Islandora/islandora_mirador)[ Packagist](https://packagist.org/packages/islandora/islandora_mirador)[ Docs](https://github.com/Islandora/islandora_mirador)[ RSS](/packages/islandora-islandora-mirador/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (29)Used By (1)

[![Islandora](https://cloud.githubusercontent.com/assets/2371345/25624809/f95b0972-2f30-11e7-8992-a8f135402cdc.png)](https://cloud.githubusercontent.com/assets/2371345/25624809/f95b0972-2f30-11e7-8992-a8f135402cdc.png)

Mirador viewer integration for Drupal
=====================================

[](#mirador-viewer-integration-for-drupal)

[![Minimum PHP Version](https://camo.githubusercontent.com/eb773fa94283cbea6c7b192d460983a781ae4a16409af56d109fe3e8e71ab6c9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e342d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/)[![Contribution Guidelines](https://camo.githubusercontent.com/00be726fac5762979d2c8a7428f28d9526d61eb290fc6d54b7031511d9445940/687474703a2f2f696d672e736869656c64732e696f2f62616467652f434f4e545249425554494e472d47756964656c696e65732d626c75652e737667)](./CONTRIBUTING.md)[![LICENSE](https://camo.githubusercontent.com/244607c741b08a9bfbaca45498deef0db2a598ac7f42ac1d0cba12fa91472379/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c76322d626c75652e7376673f7374796c653d666c61742d737175617265)](./LICENSE)[![codecov](https://camo.githubusercontent.com/6f840b82d41ab7f42f1d9690143454082a081ab6c9932c263ebcdcbc494dab0e/68747470733a2f2f636f6465636f762e696f2f67682f49736c616e646f72612f69736c616e646f72612f6272616e63682f322e782f67726170682f62616467652e737667)](https://codecov.io/gh/Islandora/islandora)

Introduction
------------

[](#introduction)

This is a Drupal module that wraps around the Mirador image viewer. It does not strictly require Islandora, however it depends on an [IIIF Manifests](https://iiif.io/api/presentation/2.0/). Islandora generates these manifests but they can also come from third-party sources.

Installation
------------

[](#installation)

```
$ composer require drupal/islandora_mirador
$ drush en islandora_mirador
```

If you wish to make use of Islandora's display hint system, and Mirador hasn't been set up by an installation stack such as ISLE or the Islandora Playbook, you will need to import the display hint using Drush:

```
drush migrate:import islandora_mirador_tags
```

### Upgrading from Islandora Defaults

[](#upgrading-from-islandora-defaults)

This module was formerly distributed with Islandora Defaults. If you are upgrading you may need to clear Drupal's cache and re-start your web server to resolve a Plugin Not Found error.

### Mirador library

[](#mirador-library)

The module can use either an instance of Mirador Integration hosted on the web, or deployed locally.

Islandora maintains a version of the Mirador library that includes image manipulation and text overlay plugins. This compiled library is available on the web at , and the github project is at .

If you have a local build, put it in your webroot at libraries/mirador/dist/main.js.

Usage
-----

[](#usage)

This module provides a Block that can be included via Structure&gt;Blocks or Contexts. It takes a IIIF manifest.

The module also provides a "Mirador" term in the `islandora_display` vocabulary that can be selected as a display hint when editing an Islandora Repository Item object. This can be used to trigger the above block placement.

See the documentation for [Islandora IIIF](https://islandora.github.io/documentation/user-documentation/iiif/) for how to set up the content that powers the viewer.

Configuration
-------------

[](#configuration)

The Islandora Mirador configuration page is located at "Administration » Configuration » Media » Mirador Settings" (`/admin/config/media/mirador`).

- **Mirador library location:** You can select if the library is deployed locally or set the remote library's location (see [Mirador library](#mirador-library) above).
- **Enabled Plugins:** You can also enable particular plugins. You need to know if the plugins are included in the particular build of Mirador Integration. The Islandora version of Mirador supports both the "Text Overlay" and "Mirador Image Tools" plugins.
- **IIIF Manifest URL:** You can set the URL pattern to retrieve the IIIF manifest for a piece of content. Default Islandora comes with a REST export view titled "IIIF Manifest", found at `/admin/structure/views/view/iiif_manifest`. The URL to provide can be found in the single page display's path settings.
    [![](docs/iiif_manifest_view_path_settings.png)](docs/iiif_manifest_view_path_settings.png)

Replace `%node` with `\[node:nid\]`, and prepend with the domain of your installation:
!\[mirador\_settings\_manifest\_url.png\](docs%2Fmirador\_settings\_manifest\_url.png) Plugins
-------

[](#plugins)

### Default Plugins

[](#default-plugins)

As of version &gt;= 2.3 the default Islandora Mirador configuration utilizes UPEI's version of the Mirador library, which is compiled with these Mirador 3 plugins:

- [Image Tools](https://github.com/ProjectMirador/mirador-image-tools)

    Toolbar providing extra image manipulation features like invert colors.
- [Text Overlay](https://github.com/dbmdz/mirador-textoverlay)

    Overlays embedded text such as hOCR on to the UI for text selection and screen reader support.

### Developing Custom Plugins

[](#developing-custom-plugins)

In Mirador 3 plugins must be built in to the application. See the documentation page [Creating Mirador 3 Plugins](https://github.com/ProjectMirador/mirador/wiki/M3---Creating-a-Mirador-plugin) for more information.

Follow the [Mirador library](#mirador-library) instructions above for deploying your custom-built Mirador app above to make it available to your Islandora site.

You can add support for other Mirador plugins in Islandora itself by implementing the plugin type defined in this module. To do so, declare a subclass of Drupal\\islandora\_mirador\\IslandoraMiradorPluginPluginBase and add the following annotation:

```
/**
 * @IslandoraMiradorPlugin(
 *   id = "machineName",
 *   label = @Translation("Plugin label"),
 *   description = @Translation("Description of the plugin .")
 * )
 */
```

The only function so far is windowConfigAlter. You can use it to supply any configuration the plugin requires. Modifying the configuration in the UI is not implemented yet.

Using Text Overlay
------------------

[](#using-text-overlay)

When Mirador text overlay is configured properly, users can view, select, and use screen readers to read text that has been OCR'd in scanned documents. With further work (yet to be implemented in the islandora\_iiif module), the Mirador viewer will be able to highlight text found via a search, and display a search interface to search within the viewer.

### Setting up hOCR

[](#setting-up-hocr)

To display a text overlay, Mirador must be provided with hOCR text data - which is OCR'd text that includes position information for the extracted text relative to the image that is being displayed. Here are the steps:

1. Ensure you're running isle-buildkit version 3.2.12 or above
2. Install the Drupal modules [https://github.com/discoverygarden/islandora\_hocr](https://github.com/discoverygarden/islandora_hocr) and [https://github.com/Born-Digital-US/islandora\_iiif\_hocr](https://github.com/Born-Digital-US/islandora_iiif_hocr)
3. Create a derivative action so when Original File images are uploaded to your repository a `file` media entity is created with `field_media_use` equal to the `hOCR` media use term created by [https://github.com/discoverygarden/islandora\_hocr](https://github.com/discoverygarden/islandora_hocr)

### Test hOCR

[](#test-hocr)

Follow these steps to confirm that hOCR is working.

1. Add a new Repository Item with type **Paged Content**
2. Add a child object of type **Page**
3. On that child object, add a Media of type **File** and populate it with a JP2 or TIFF file that has text on it.
    - Check **Original File** under "**Media Use**" (do NOT check any other media usages)
    - Do not add anything to the hOCR Extracted Text field you created. This will be populated when OCR is run on this file.
4. Save the media.
5. After about a minute, the extracted text with positional data field should be populated. You can verify this directly by editing the File object and seeing that the "hOCR extracted Text" field now has a file attached to it, and you can view the file and observe that it contains xml text that looks something like this:
    [![sample-hocr-xml.png](docs%2Fsample-hocr-xml.png)](docs%2Fsample-hocr-xml.png)

### Configuring the IIIF Manifest view for the Manifest additions

[](#configuring-the-iiif-manifest-view-for-the-manifest-additions)

Assuming hOCR is [set up](#setting-up-hocr) and [tested](#test-hocr)...

Follow the instructions at [https://github.com/Born-Digital-US/islandora\_iiif\_hocr](https://github.com/Born-Digital-US/islandora_iiif_hocr#usage) to allow searching inside the mirador viewer on your hOCR

### Configuring the Mirador viewer to display for Pages and Paged Content using Contexts

[](#configuring-the-mirador-viewer-to-display-for-pages-and-paged-content-using-contexts)

Islandora uses contexts to control which blocks are displayed on different Islandora nodes. *Note that the following instructions are just one of many possible ways to configure this.*

If not already present, you will need to add Mirador display contexts for single page and paged content types:
[![context-mirador-displays.png](docs%2Fcontext-mirador-displays.png)](docs%2Fcontext-mirador-displays.png)

Configure contexts at "Administration » Structure » Context".

- For single page ("Mirador") context, you can condition on the "Node has term" "Mirador" (if you like, AND "Page"), and set the reaction to Blocks. Use a View such as Media Display (part of Islandora Starter Site) to provide a block that displays the appropriate media using the "Mirador" view mode:
    [![context-mirador.png](docs%2Fcontext-mirador.png)](docs%2Fcontext-mirador.png)
- For multi-page ("Paged Content - Mirador") context, we condition on the "Node has term" "Mirador" AND "Paged Content"
    [![context-mirador-paged-condition.png](docs%2Fcontext-mirador-paged-condition.png)](docs%2Fcontext-mirador-paged-condition.png)
    ...and set the reaction to show the Mirador block in the content region
    [![context-mirador-paged-block-content.png](docs%2Fcontext-mirador-paged-block-content.png)](docs%2Fcontext-mirador-paged-block-content.png)
    ... which is configured using `.../book-manifest` for the IIIF Manifest URL
    [![context-mirador-paged-block-config.png](docs%2Fcontext-mirador-paged-block-config.png)](docs%2Fcontext-mirador-paged-block-config.png)

As noted previously, this is just one way to set up the Mirador viewer configurations. If, for example, you wanted to always use the Mirador viewer for pages and paged content, you could remove the "Mirador" condition from the "Node has term" condition in these contexts.

Theme Variables
---------------

[](#theme-variables)

Mirador's appearance and behaviour is configured via settings passed to the JavaScript application. Mainly in 'window' and 'workspace' configuration array.

These can be specified via theme variables or by passing them as arguments instantiating the Mirador block class.

To hide the close button via a theme hook:

```
function mymodule_preprocess_mirador(&$variables) {
  $variables['window_config']['allowClose'] = FALSE;
}
```

To make a minimal UI by instantiating the block:

```
      $block = \Drupal::service('plugin.manager.block')->createInstance($viewer . '_block', [
        'iiif_manifest_url' => "/node/$manifest_nid/manifest-single",
        'thumbnail_navigation_position' => 'hidden',
        'window_config' => [
          'allowClose' => FALSE,
          'allowMaximize' => FALSE,
          'allowTopMenuButton' => FALSE,
          'allowWindowSideBar' => FALSE,
          'hideWindowTitle' => TRUE,
          'panels' => [
            'info' => FALSE,
            'attribution' => FALSE,
            '	  canvas' => FALSE,
            'annotations' => FALSE,
            'search' => FALSE,
          ],
        ],
        'workspace_config' => [
          'allowNewWindows' => FALSE,
          'isWorkspaceAddVisible' => FALSE,
          'workspaceControlPanel' => [
            'enable' => FALSE,
          ],

        ],
      ]);
```

See the Mirador FAQ for more options:

Documentation
-------------

[](#documentation)

Further documentation for IIIF (International Image Interoperability Framework) is available on the [Islandora 8 documentation site](https://islandora.github.io/documentation/user-documentation/iiif/).

Troubleshooting/Issues
----------------------

[](#troubleshootingissues)

Having problems? Solved a problem? Join the Islandora [communication channels](https://www.islandora.ca/community#channels-of-communication) to post questions and share solutions:

- [Islandora Mailing List (Google Group)](https://groups.google.com/g/islandora)
- If you would like to contribute or have questions, please get involved by attending our weekly [Tech Call](https://github.com/Islandora/islandora-community/wiki/Weekly-Open-Tech-Call), held virtually via Zoom **every Wednesday** at [**1:00pm Eastern Time US**](https://dateful.com/convert/est-edt-eastern-time?t=13). Anyone is welcome to join and ask questions! The Zoom link can be found in the meeting minutes [here](https://github.com/Islandora/islandora-community/wiki/Weekly-Open-Tech-Call).

If you would like to contribute code to the project, you need to be covered by an Islandora Foundation [Contributor License Agreement](https://github.com/Islandora/islandora-community/wiki/Onboarding-Checklist#contributor-license-agreements) or [Corporate Contributor License Agreement](https://github.com/Islandora/islandora-community/wiki/Onboarding-Checklist#contributor-license-agreements). Please see the [Contributor License Agreements](https://github.com/Islandora/islandora-community/wiki/Contributor-License-Agreements) page on the islandora-community wiki for more information.

License
-------

[](#license)

[GPLv2](http://www.gnu.org/licenses/gpl-2.0.txt)

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance88

Actively maintained with recent releases

Popularity35

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~71 days

Recently: every ~41 days

Total

19

Last Release

54d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e6875ca967e30c512a9e14c6f05bba3199759ff56393ccf338ffddea4549e93?d=identicon)[Islandora](/maintainers/Islandora)

---

Top Contributors

[![alxp](https://avatars.githubusercontent.com/u/82412?v=4)](https://github.com/alxp "alxp (63 commits)")[![elizoller](https://avatars.githubusercontent.com/u/5439169?v=4)](https://github.com/elizoller "elizoller (40 commits)")[![rosiel](https://avatars.githubusercontent.com/u/1943338?v=4)](https://github.com/rosiel "rosiel (20 commits)")[![joecorall](https://avatars.githubusercontent.com/u/1189940?v=4)](https://github.com/joecorall "joecorall (20 commits)")[![adam-vessey](https://avatars.githubusercontent.com/u/607975?v=4)](https://github.com/adam-vessey "adam-vessey (14 commits)")[![seth-shaw-asu](https://avatars.githubusercontent.com/u/108362375?v=4)](https://github.com/seth-shaw-asu "seth-shaw-asu (5 commits)")[![ajstanley](https://avatars.githubusercontent.com/u/494887?v=4)](https://github.com/ajstanley "ajstanley (3 commits)")[![wgilling](https://avatars.githubusercontent.com/u/19391126?v=4)](https://github.com/wgilling "wgilling (2 commits)")[![aOelschlager](https://avatars.githubusercontent.com/u/41480572?v=4)](https://github.com/aOelschlager "aOelschlager (2 commits)")[![kspurgin](https://avatars.githubusercontent.com/u/450570?v=4)](https://github.com/kspurgin "kspurgin (1 commits)")[![mjordan](https://avatars.githubusercontent.com/u/403918?v=4)](https://github.com/mjordan "mjordan (1 commits)")[![Natkeeran](https://avatars.githubusercontent.com/u/1827166?v=4)](https://github.com/Natkeeran "Natkeeran (1 commits)")[![patdunlavey](https://avatars.githubusercontent.com/u/241240?v=4)](https://github.com/patdunlavey "patdunlavey (1 commits)")[![jordandukart](https://avatars.githubusercontent.com/u/1337738?v=4)](https://github.com/jordandukart "jordandukart (1 commits)")[![inikolaidis](https://avatars.githubusercontent.com/u/27832605?v=4)](https://github.com/inikolaidis "inikolaidis (1 commits)")[![Aryan-R-Patel](https://avatars.githubusercontent.com/u/107621152?v=4)](https://github.com/Aryan-R-Patel "Aryan-R-Patel (1 commits)")

---

Tags

islandoradrupalIslandora

### Embed Badge

![Health badge](/badges/islandora-islandora-mirador/health.svg)

```
[![Health](https://phpackages.com/badges/islandora-islandora-mirador/health.svg)](https://phpackages.com/packages/islandora-islandora-mirador)
```

###  Alternatives

[composer/installers

A multi-framework Composer library installer

1.4k136.0M6.0k](/packages/composer-installers)[drupal/drupal-extension

Drupal extension for Behat

22215.1M147](/packages/drupal-drupal-extension)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M446](/packages/drupal-core-composer-scaffold)[palantirnet/drupal-rector

Instant fixes for your Drupal code by using Rector.

1544.2M20](/packages/palantirnet-drupal-rector)[drupal/drupal-driver

A collection of reusable Drupal drivers

6715.8M18](/packages/drupal-drupal-driver)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
