mirador
Version:
An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.
13 lines (11 loc) • 387 B
JavaScript
import { Utils } from 'manifesto.js';
/** @returns an IIIF image service for the given resource */
export function getIiifResourceImageService(resource) {
return resource
.getServices()
.find(
(service) =>
(service.getProfile && Utils.isImageProfile(service.getProfile() || '')) ||
Utils.isImageServiceType(service.getIIIFResourceType() || ''),
);
}