Skip to content

All figures should have a correctly defined thumbnail with sensible fallbacks #1171

@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

Every figure should have a thumbnail defined and every thumbnail should correctly resolve to an existing image.

If thumbnail is defined for the figure in figures.yaml it should be used; if not, but if the figure is set to zoom: true the thumbnail generated by sharp should be used (see _plugins/figures/iiif/config.js); otherwise, the src in figures.yaml should be used.

A slightly more fulsome solution here would also include fallbacks for figures that don't have viable src paths like tables, sequences, and annotations images. But at least with the schema above, users have a way of manually defining thumbnails for those specialty figures.

Actual Behavior

Due to unfinished work, the thumbnail for all figures is being set to the staticInlineFigureImage, which only exists for IIIF images. See lines 350–51 in _plugins/figures/figure/index.js.

// TODO: implement thumbnail getter
thumbnail: this.staticInlineFigureImage

Steps to Reproduce

n/a

Version Numbers

All 1.0.0 versions up to and including quire-cli 1.0.0-rc.33 and quire-11ty 1.0.0-rc.40

Web Browser

No response

Relevant Terminal/Shell Output

Supporting Information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions