The need may arise for different versions of the same image to be used in different parts of your site. ImageKit is an app that takes care of processing your source image and storing and retrieving the different versions. The project’s github page with install and usage instructions is at
In this post I’ll be giving examples of ImageKit usage and then show how to make your own ImageProcessor.
Suppose you have an app named image_app that has a gallery page with image thumbnails. Clicking on a thumbnail in the gallery page will send you to a kind of profile page with a black and white portrait image. Clicking on that image will show you the original, full-sized image. This means you have to store three versions of the image.

The following image is stored in original_image:


The spec_module referenced is in the image_app directory:

All ImageSpecs (currently just Thumbnail) are applied to original_image because the file was specified in IKOptions in Photo.
The part of the template that outputs the thumbnails is:

Which produces something like:


Moving onto the profile page, the following are added to

ToBWProcessor is a custom ImageProcessor that makes the image black and white. This could actually also be accomplished using an Adjustment (like the one used for Thumbnail) and setting color to 0.0 but it was done with an ImageProcessor for demo purposes. The process class method of an ImageProcessor is passed the PIL Image object img, the image format type (JPEG, PNG, etc.) in the string fmt, and the model instance obj. It should return the tuple of img, fmt.
The image is displayed in the template by:

Photo by Paul Mannix ( licensed under Creative Commons Attribution (