Django thumbnails, resize image with PIL and python There is a wide variety of django filters and tags to crop, resize or make a thumbnail out of an image but most of them seem to reinvent the wheel. #!/usr/bin/env python try: from PIL import Image, ImageOps except ImportError: import Image import ImageOps image = Image.open('snake.jpg') # ImageOps compatible mode if image.mode not in ("L", "RGB")