@lde/iiif-image
v0.2.0
Published
Find the images a IIIF Presentation manifest paints, with their size and image service, and read their image services’ info.json into dimensions, server limits and a ladder of sizes
Readme
@lde/iiif-image
Find the images a IIIF Presentation manifest paints, with their stated size and
image service, and read that service’s
info.json into dimensions and a ladder of sizes, in either API
version, without the consumer having to know which.
Installation
npm install @lde/iiif-imageimport { images, readImageService } from '@lde/iiif-image';
const [cover] = images(manifest);
const serviceUrl = cover?.service;
if (serviceUrl !== undefined) {
// `info` is the document at `${serviceUrl}/info.json`.
const thumbnail = readImageService(serviceUrl, info)?.sizes[0]?.url;
}Documentation
See the full documentation.
