Thumbor
A smart imaging service and enables on-demand cropping, resizing, applying filters and optimizing images.
Alternatives
Tech stack
No tech stack added yet. Sign in to suggest some
Note: We were unable to retrieve content from the official website. The following is compiled from publicly available information about the project. For specifics, please refer to thumbor.org and the official documentation.
Overview
Thumbor is an open-source smart image processing service, originally developed by the Brazilian media group Globo.com. It is written in Python and released under the MIT license. It works by putting operations such as cropping, resizing, and filters into the image URL; when the server receives a request, it processes the original image in real time and returns the result. This way, a single original image can be used to generate versions in all kinds of sizes and styles on demand, with no need to batch-generate thumbnails in advance.
Key Features
- On-demand cropping and resizing: Specify the target width and height, crop area, flip direction, and alignment in the URL, and the image is generated at request time.
- Smart Crop: Uses detectors such as OpenCV to identify faces and important features in an image, so that cropping preserves the subject as far as possible instead of simply cutting from the center.
- Rich filters: Use the
filters:parameter to adjust quality, format, brightness, contrast, and blur, add watermarks, round corners, and more. - URL signing for security: URLs are signed with HMAC using a secret key, preventing others from crafting arbitrary requests and abusing server resources. The
unsafemode can be used for debugging. - Pluggable architecture: Loaders, Storage, Result Storage, image engines, and detectors can all be replaced or extended, allowing integration with a variety of backends such as file systems, HTTP sources, and object storage.
- Multiple output formats: Supports common output formats such as JPEG, PNG, and WebP, and can automatically choose a format based on client capabilities.
URL Example
http://localhost:8888/unsafe/300x200/smart/example.com/image.jpg
This request smart-crops the original image to 300×200 pixels.
Target Users and Use Cases
- Image-heavy sites such as news, media, and e-commerce, which need to serve images in multiple sizes for different pages and devices.
- Development teams that want to run their own image processing service as a replacement for a commercial image CDN.
- Cropping scenarios, such as avatars, product images, and cover images, where the subject needs to be preserved automatically.
- Working together with a CDN, serving as an image origin that provides dynamic processing.
Core Strengths
- Fully open source and self-hostable, with no dependence on third-party commercial services.
- Smart cropping works well, making it a good fit for photos of people and news images.
- Highly extensible, with many community-provided plugins and client libraries in various languages for generating signed URLs.
- Proven in production on large media sites.
Installation and Deployment
Install with pip:
pip install thumbor
thumbor --port=8888
Generate a configuration file:
thumbor-config > thumbor.conf
The community also maintains Docker images, so you can deploy with containers. In production, a reverse proxy or CDN is usually placed in front for caching.
Technical Requirements
- A Python runtime (recent versions are based on Python 3)
- Depends on image processing libraries such as Pillow; smart detection requires additional components such as OpenCV
- A caching layer (result storage or a CDN) is recommended to reduce the overhead of repeated processing
Things to Note
- In production, disable
unsafemode and enable URL signing to prevent the service from being abused. - Image processing is fairly CPU-intensive, so under high concurrency you need to configure caching and horizontal scaling appropriately.
Discover more
LibrePhotos
Photo management service with a slight focus on cool graphs (alternative to Google Photos).
ChronoFrame
Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.
HomeGallery
Browse personal photos and videos featuring tagging, mobile-friendly, and AI powered image discovery.
Lychee
Grid and album based photo-management-system.
Photofield
Experimental fast photo viewer.
PiGallery 2
A directory-first photo gallery website, with a rich UI, optimised for running on low resource servers.