Skip to content

Fix IIIF Level 0 thumbnail resolution - #8

Merged
ewlarson merged 1 commit into
developfrom
agent/fix-unr-iiif-thumbnails
Aug 13, 2026
Merged

Fix IIIF Level 0 thumbnail resolution#8
ewlarson merged 1 commit into
developfrom
agent/fix-unr-iiif-thumbnails

Conversation

@ewlarson

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve the stable OGM resource thumbnail endpoint while resolving IIIF Image API info.json documents according to their advertised capabilities.
  • Select an advertised static rendition for Level 0 services instead of generating an unsupported !800,800 request.
  • Tighten IIIF Presentation manifest detection so files such as dataset_manifest.json are not fetched as images.
  • Apply the resolved source consistently across worker fetching, hashing, caching, cache clearing, and the no-cache endpoint.
  • Add regression coverage for the affected UNR resource and the complete info.json → rendition → image-cache worker path.

Root cause

The affected UNR records expose static IIIF Image API Level 0 services. OGM rewrote those sources to /full/!800,800/0/default.jpg, but Level 0 only guarantees its advertised sizes; the generated request returned 403 even though a valid rendition existed. Separately, the broad manifest heuristic classified dataset_manifest.json as a IIIF Presentation manifest, causing JSON to be processed as image content.

Impact

After deployment, the existing meta.ui.thumbnail_url contract remains unchanged. An uncached request queues generation and returns the non-cacheable fallback while processing; subsequent requests redirect to the real cached thumbnail.

Validation

  • 59 passed across focused service, worker, and endpoint tests
  • ruff check passed for all changed files
  • ruff format --check passed for all changed files
  • git diff --check passed
  • The exact selected UNR rendition /full/924,/0/default.jpg returns 200 OK with Content-Type: image/jpeg

@ewlarson
ewlarson marked this pull request as ready for review August 13, 2026 20:36
@ewlarson
ewlarson merged commit 852c93d into develop Aug 13, 2026
1 check passed
@ewlarson
ewlarson deleted the agent/fix-unr-iiif-thumbnails branch August 21, 2026 14:04
ewlarson added a commit that referenced this pull request Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant