Feature #1426

API: Display image smaller size

Added by Bernhard Koschiček-Krombholz 10 months ago. Updated about 2 months ago.

Target version:
Start date:
Estimated time:


Some images can be very large in file size. Since the API should also provide data for different front-ends, it can be useful, that API clients can forcefully downsize images. One idea is, that the normal display path will show the full image. With parameters the client can demand a 30% size version of the image. Or the image pixel size will be downsized to a number like 1200px. The path will be /api/display/image.jpg?size=30 or /api/display/hsize=1200 or /api/display/vsize=1200 (horizontal and vertical size)

If python can not do it by itself, maybe the Pillow package can do this.

Related issues

Related to Feature #1280: Picture PreviewClosed2021-04-02Actions
Related to Question #1517: decide on/implement content negotiation for image APIClosed2021-05-17Actions
Follows Feature #1492: Image Processing Closed2021-04-01Actions



Updated by Alexander Watzinger 10 months ago


Updated by Alexander Watzinger 10 months ago

My take on this is that we will need some image processing in OpenAtlas sooner or later anyway. I linked a related issue about previews and although nobody wrote a ticket so far some people mentioned they would like a slideshow and similar. Once we have solved this for OpenAtlas (thumbnails, previews, slideshows, ...) we could decide if this is sufficient for the API too or if we would need extra functionality there.

What would be needed now is a volunteer who delves into this topic and drafts a solution proposal which we can than discuss together ;)
I started a draft and everybody is welcomed to join/take over: Image processing


Updated by Bernhard Koschiček-Krombholz 9 months ago

I tried to play around with Pillow, but sadly couldn't make it work on my machine.


Updated by Bernhard Koschiček-Krombholz 8 months ago

pillow has no buster package... I looked into pythonmagick ( and found Wand ( with following documentation:
Alex, can you look at the package and tell me, if this will work with OA installations?


Updated by Bernhard Koschiček-Krombholz 6 months ago

If now more and more projects asks for IIIF standard, maybe it is better to got straight to IIIF implementation?


Updated by Bernhard Koschiček-Krombholz 6 months ago

  • Follows Feature #1492: Image Processing added
  • Start date changed from 2020-12-01 to 2021-04-02

Updated by Bernhard Koschiček-Krombholz 5 months ago

  • Status changed from Acknowledged to In Progress

Feature is done, testing and mypy in progress


Updated by Christoph Hoffmann 4 months ago

  • Related to Question #1517: decide on/implement content negotiation for image API added

Updated by Bernhard Koschiček-Krombholz 4 months ago

  • Status changed from In Progress to Resolved

It is possible to get different sizes of images through an API request at the endpoint and the parameter image_size. Possible arguments are: 'thumbnail' (200px), 'table' (100px).


Updated by Bernhard Koschiček-Krombholz 2 months ago

  • Target version changed from API to 6.4.0
  • Status changed from Resolved to Closed

Updated by Alexander Watzinger about 2 months ago

  • Subject changed from API: display image smaller size to API: Display image smaller size

Also available in: Atom PDF