Building and using an image server
A Single Image Server for All Views and Use Cases of the Photothek
All views in this project — photo search, photo boxes, buildings map, and artist index — access one shared image repository. It is delivered by a Cantaloupe server, an open-source, dynamic image server that implements the IIIF Image API.
Advantages of the Image Server Architecture
The central image server fully decouples the applications from image storage:
- Lightweight applications — photo search, photo boxes, map, and artist index store no image files of their own; they merely reference the server via stable identifiers.
- No redundant image storage — previews, detail views, and cutouts are not pre-generated and stored redundantly, but computed on demand.
- New views without extra effort — every additional application connects to the collection through the same interface, without building its own image infrastructure.
- Standards compliance — as an IIIF server, the image collection is also directly usable by external, IIIF-capable tools (e.g. Mirador, OpenSeadragon).
Images on Demand — the IIIF Image API
Rather than generating and storing different image sizes in advance for each view, the server computes every variant on demand. An image request follows a uniform URL scheme:
{server}/{identifier}/{region}/{size}/{rotation}/{quality}.{format}
The parameters are applied in a fixed order — first the image region (region), then the size (size), rotation (rotation), color quality (quality), and finally the output format (format). From a single source file, this produces everything the interfaces need: thumbnails for result lists and galleries, high-resolution full views for detailed viewing, arbitrary intermediate sizes and quality levels depending on device and connection, and targeted cutouts of individual image details.
Pre-rendered copies become unnecessary — saving storage space and keeping the collection consistent.
From TIFF to JPEG 2000
The image masters originally existed as uncompressed TIFF files — archivally faithful, but enormously large (in the test collection of 104 images, an average of 219 MB per file, nearly 23 GB in total). A systematic format comparison on this collection confirmed the move to JPEG 2000 (JP2):
- Lossless JP2 already reduces file size by around 68% (to approx. 32% of the original) with mathematically exact, bit-accurate reconstruction — suitable as an archival master format.
- Lossy JP2 with a compression target of about 40 dB PSNR compresses the same collection to only around 2–3% of the original size (a factor of ~44:1). This value is considered visually lossless: the original and compressed image cannot be distinguished by the naked eye, while file size drops dramatically. This compression target is used for the production collection.
JPEG 2000 is particularly well suited to the image server because it supports targeted decoding of individual regions (region of interest) and reduced resolution levels (progressive decoding) — exactly the operations the server performs anyway for cutouts and previews. By comparison, classic lossless alternatives (TIFF with LZW or ZIP compression) perform noticeably worse: they achieve only about half the compression of JP2 and are sometimes considerably slower to convert. This preserves archival quality while substantially reducing the storage footprint of the overall collection.
Always Delivered as JPEG
However capable the source formats are, web browsers cannot natively display TIFF or JPEG 2000; native JP2 support is currently found in practice only in Safari. The image server addresses this by transcoding to JPEG on every delivery. This gives the interfaces a universally displayable format, and no browser or display incompatibilities arise — regardless of the format in which the masters are archived.
Derivatives: Cutout Photographs for Listings and Visual Search
For the visual image search in use, as well as for thumbnails in listings, cutout photos without the labeled mounting boards are needed…
(To be continued)