Skip to content

EPUBs cannot be generated with external IIIF images that aren't hosted within Quire #1190

@geealbers

Description

@geealbers

Before proceeding, make sure there isn’t an existing issue for this bug.

  • I have searched the existing issues and determined this is a new bug.

Expected Behavior

If a user includes an external IIIF image like this:

  - id: "irises"
    iiif_image: https://media.getty.edu/iiif/image/8c255d80-7382-46db-9fa8-892c0d37247e/
    zoom: true

The image should display everywhere it is needed within the Quire project and its outputs, just as it would if it were instead a static image hosted within the project directly

  - id: "irises"
    src: figures/irises.jpg
    zoom: true

Actual Behavior

When hostExternal: false is set in _plugins/figures/iiif/config.js, an error occurs (coming from epub.js) when trying to run quire epub:

[CLI:lib/epub] generating EPUB using Epub.js
[CLI:lib/epub/epubjs] Generating ePub from /Users/galbers/test-external-iiif-2/_epub
TypeError [ERR_INVALID_URL_SCHEME]: The URL must be of scheme file
    at fileURLToPath (node:internal/url:1509:11)
    at ManifestToEpub.create (file:///Users/galbers/node_modules/epubjs-cli/src/epub.js:128:19)
    at async default (file:///Users/galbers/GitHub/quire/packages/cli/src/lib/epub/epub.js:15:18)
    at async file:///Users/galbers/GitHub/quire/packages/cli/src/lib/epub/index.js:38:12
    at async Command.action (file:///Users/galbers/GitHub/quire/packages/cli/src/commands/epub.js:52:5) {
  code: 'ERR_INVALID_URL_SCHEME'
}
[CLI:lib/epub/epubjs] file not found /Users/galbers/test-external-iiif-2/_epub

Steps to Reproduce

  1. Start a new project
  2. Add an external IIIF image like the example above
  3. Run quire build and then quire epub

Version Numbers

[test-latest-41]
 quire-cli 1.0.0-rc.33
 quire-11ty 1.0.0-rc.41
 starter https://github.com/thegetty/quire-starter-default@2.10.0
[System]
 quire-cli 1.0.0-rc.33
 node v22.10.0
 npm 10.9.0
 os Darwin 22.6.0

Web Browser

No response

Relevant Terminal/Shell Output

Supporting Information

This issue was originally opened in Jira by @geealbers on 03/Sep/25 as DEV-21900

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugActual behavior does not match expected behavioriiifIssue related to IIIF processing, canvas-panel, or sequence-panelstatus:backlogIssue is a lower priority but needs to eventually be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions