Skip to content

Latest commit

 

History

History

simple_images

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Use non IIIF Images in a Manifest

It has been possible to use non-IIIF images in a Manifest since the beginning of IIIF but the viewer support has only come into place in the last year or so. When I talk about a Non IIIF image, this is something like:

Which is just a straight jpg like any other image on the web. To add this to a manifest you create a canvas in the following form:

{
    "@id": "http://example.com/canvas/2",
    "@type": "sc:Canvas",
    "label": "Static Image",
    "height": 3024,
    "width": 4032,
    "thumbnail": "https://fixtures.iiif.io/images/Glen/photos/gottingen.jpg",
    "images": [
        {
            "@id": "http://example.com/canvas/2/annotation/1",
            "@type": "oa:Annotation",
            "motivation": "sc:painting",
            "resource": {
                "@id": "https://fixtures.iiif.io/images/Glen/photos/gottingen.jpg",
                "@type": "dctypes:Image",
                "format": "image/jpeg",
                "height": 3024,
                "width": 4032
            },
            "on": "http://example.com/canvas/2"
        }
    ]
}

The parts that you need to edit in the code above is the references to height and width which should match the image you are using. Then replace the resoure/@id and thumbnail with the URL to your image. The thumbnail isn't strictly required but you get a broken image in the thumbnail side panel in the UV if you don't include it. This is enough to create a canvas with a non IIIF image and the manifest can be annotated just like any other manifest.

See the links below to see this in action:

note: the second canvas in this example is a IIIF image so you can see the difference between a IIIF Image and a Non IIIF Image.

The only real downside to this approach over using a IIIF image is:

  • It will be very slow for very large images
  • With smaller images you don't get the same levels of zoom.