Unlock seamless workflows and faster delivery with our latest releases – get the details

International Image Interoperability Framework (IIIF) API reference

The International Image Interoperability Framework (IIIF) provides a standardized way of delivering and describing images shared on the web. This is the reference documentation for how you can interact with the asset pipeline using IIIF.

The Sanity asset pipeline supports the International Image Interoperability Framework API (IIIF). The URL schema for IIIF supported APIs looks like this: {scheme}://{server}{/prefix}/{identifier}

For the Sanity asset pipeline, that translates to:

https://cdn.sanity.io/image/{projectId}/{dataset}/iiif/{identifier}

You can go to the official IIIF API reference to find all the identifiers and different ways of querying images in your dataset.

Examples

General image info

If you go to https://cdn.sanity.io/images/zp7mbokg/production/iiif/0078ltwW67gQ_k61DhalsnpQPP0RXS14878ui-500x750.jpg/info.json it will return this JSON structure:

{
  "@context": "http://iiif.io/api/image/2/context.json",
  "@id": "https://cdn.sanity.io/images/zp7mbokg/production/iiif/0078ltwW67gQ_k61DhalsnpQPP0RXS14878ui-500x750.jpg",
  "protocol": "http://iiif.io/api/image",
  "profile": ["http://iiif.io/api/image/2/level2.json"],
  "width": 500,
  "height": 750,
  "sizes": [
    { "width": 50, "height": 75 },
    { "width": 200, "height": 300 },
    { "width": 600, "height": 900 },
    { "width": 1200, "height": 1800 },
    { "width": 2000, "height": 3000 }
  ],
  "tiles": [{ "width": 512, "scaleFactors": [1, 2, 4, 8, 16] }]
}

Default, full-size

Identifier: /full/full/0/default.jpg

https://cdn.sanity.io/images/zp7mbokg/production/iiif/0078ltwW67gQ_k61DhalsnpQPP0RXS14878ui-500x750.jpg/full/full/0/default.jpg

Alan Rickman in full proportions

Square crop, 75% size, gray color, png format

Identifier: square/pct:25/0/gray.png

https://cdn.sanity.io/images/zp7mbokg/production/iiif/0078ltwW67gQ_k61DhalsnpQPP0RXS14878ui-500x750.jpg/square/pct:75/0/gray.png

Alan Rickman in a square crop and grey color

Was this article helpful?