Requirements

Base requirements

Key Value Store

sorl-thumbnail needs a Key Value Store for its operation. You can choose between a cached database which requires no special installation to your normal Django setup besides installing a proper cache like memcached or you can setup redis which requires a little bit more work.

Cached DB

All you need to use the cached database key value store is a database and cache setup properly using memcached. This cache needs to be really fast so using anything else than memcached is not recomended.

Redis

Redis is a fast key value store also suited for the job. To use the redis key value store you first need to install the redis server. After that install the redis client:

pip install redis

Image Library

You need to have an image library installed. sorl-thumbnail ships with support for Python Imaging Library, pgmagick, ImageMagick (or GraphicsMagick) command line tools. pgmagick are python bindings for GraphicsMagick (Magick++)`,

The ImageMagick based engine sorl.thumbnail.engines.convert_engine.Engine by default calls convert and identify shell commands. You can change the paths to these tools by setting THUMBNAIL_CONVERT and THUMBNAIL_IDENTIFY respectively. Note that youneed to change these to use GraphicsMagick to /path/to/gm convert and /path/to/gm identify.

Python Imaging Library installation

Prerequisites:

  • libjpeg
  • zlib

Ubuntu 10.04 package installation:

sudo apt-get install libjpeg62 libjpeg62-dev zlib1g-dev

Installing Python Imaging Library using pip:

pip install Pillow

Watch the output for messages on what support got compiled in, you at least want to see the following:

--- JPEG support available
--- ZLIB (PNG/ZIP) support available

pgmagick installation

Prerequisites:

  • GraphicsMagick
  • Boost.Python

Ubuntu 10.04 package installation:

sudo apt-get install libgraphicsmagick++-dev
sudo apt-get install libboost-python1.40-dev

Fedora installation:

yum install GraphicsMagick-c++-devel
yum install boost-devel

Installing pgmagick using pip:

pip install pgmagick

ImageMagick installation

Ubuntu 10.04 package installation:

sudo apt-get install imagemagick

Or if you prefer GraphicsMagick:

sudo apt-get install graphicsmagick

Wand installation

Ubuntu installation:

apt-get install libmagickwand-dev
pip install Wand