mirador-rotation

January 30, 2026 ยท View on GitHub

Node.js CI

mirador-rotation is a Mirador 4 plugin that enables the rotation of images at any angle.

๐ŸŒ Website

Visit the demo page to try it out.

๐Ÿ“– Configuration

Several configuration options are available on windows that use mirador-rotation.

Configurationtypedefaultdescription
rotationEnabledbooleanfalseEnable the plugin to be shown
rotationOpenbooleanfalseOpen the rotation controls by default

Example configuration:

const config = {
  id: "demo",
  windows: [
    {
      rotationEnabled: true,
      rotationOpen: true,
      initialViewerConfig: {
        rotation: 90,
      },
      manifestId: "https://dl.ndl.go.jp/api/iiif/1286201/manifest.json",
    },
  ],
};

๐ŸŽฎ Features

The plugin provides the following rotation controls:

ControlDescription
Rotate Left (90ยฐ)Rotate the image 90 degrees counter-clockwise
Rotate Right (90ยฐ)Rotate the image 90 degrees clockwise
Fine-tuning SliderAdjust rotation angle in 1-degree increments (-180ยฐ to 180ยฐ)
ResetReset rotation to 0 degrees
HelpShow a dialog explaining how to use the controls

๐Ÿ”— Demo URL Parameters

The demo page supports the following URL parameters:

ParameterDescriptionExample
manifestIIIF manifest URL(s), separated by ; for multiple?manifest=https://example.com/manifest.json
rotationInitial rotation angle(s) in degrees, separated by ; for multiple?rotation=90
langUI language code (e.g., en, ja, de)?lang=ja
attributionShow attribution panel by default when set to true?attribution=true

Examples

Single manifest with rotation:

?manifest=https://example.com/manifest.json&rotation=180

Multiple manifests with the same rotation:

?manifest=https://example.com/m1.json;https://example.com/m2.json&rotation=90

Multiple manifests with different rotations:

?manifest=https://example.com/m1.json;https://example.com/m2.json&rotation=90;180

๐Ÿ“– Installing mirador-rotation

mirador-rotation requires an instance of Mirador 4. See the Mirador wiki for examples of embedding Mirador within an application. See the live demo's index.js for an example of importing the mirador-rotation plugin and configuring the adapter.

๐Ÿ“ฃ Contribute

Mirador's development, design, and maintenance is driven by community needs and ongoing feedback and discussion. Join us at our regularly scheduled community calls, on IIIF slack #mirador, or the mirador-tech and iiif-discuss mailing lists. To suggest features, report bugs, and clarify usage, please submit a GitHub issue.

๐Ÿ… Sponsors

Become a sponsor