djiiif

djiiif makes it easy to expose your Django images through the IIIF (International Image Interoperability Framework) family of APIs. It extends Django’s ImageField so that, by defining one or more named profiles, every image field gains ready-made IIIF URLs — and, optionally, spec-compliant info.json, Presentation manifests, collections, activity streams, annotations, and search, served straight from Django.

models.py
from djiiif import IIIFField

class Photo(models.Model):
    image = IIIFField(upload_to="uploads/")
settings.py
IIIF_HOST = "https://images.example.org/"

IIIF_PROFILES = {
    "thumbnail": {"host": IIIF_HOST, "region": "full", "size": "150,",
                  "rotation": "0", "quality": "default", "format": "jpg"},
}
>>> photo.image.iiif.thumbnail
'https://images.example.org/uploads%2Fsunset.jpg/full/150,/0/default.jpg'

That’s the whole idea: your image server does the pixel work; djiiif builds the correct IIIF URLs and documents for it.

What djiiif gives you

Every feature beyond the core profile URLs is opt-in and backwards-compatible — nothing changes in your output until you configure it.

Where djiiif fits

djiiif does not process or serve image pixels. You pair it with a real IIIF image server — iiiris is the recommended one (IIIF Image API 3.0 + Authorization Flow 2.0), though any IIIF-compliant server or cloud IIIF service works. djiiif registers your source images with Django and produces the IIIF URLs and JSON documents that point at that server — plus, if you want, the Presentation, Discovery, Annotation, and Search documents the image server itself doesn’t provide.