Plugins
With its pluggable architecture, Thumbor provides extension points for storages, result storages, loaders, detectors, filters, engines, optimizers, metrics, error handlers, URL signers and handler lists.
If your plug-in is not listed here, please create an issue with the details and we’ll add it here.
Important
The projects listed here are maintained independently and may target different Thumbor or Python versions. Before deploying one, verify its supported versions, release status and configuration in the plugin’s own documentation. A listing on this page is not a compatibility guarantee.
Thumbor configuration values name importable Python modules. Depending on the
extension point, the module must expose the class expected by Thumbor:
Storage, Engine, Optimizer, Detector, Filter, Metrics, UrlSigner
or ErrorHandler. Loader and handler-list entries are module-based
interfaces. See the corresponding customization guide for current method
signatures.
Plugins may define configuration keys that are not part of Thumbor core. Those
keys are available to the plugin through context.config; keep their spelling
and Python value types exactly as documented by the plugin. Environment
variable overrides are always strings: moving a list, boolean, number,
dictionary or None from thumbor.conf to an environment variable changes
its type.
Defining plugin configuration
Plugin modules should register their defaults through thumbor.config.Config
when they are imported:
from thumbor.config import Config
Config.define(
"MY_PLUGIN_TIMEOUT",
5,
"Maximum time in seconds for my plugin operation",
"My Plugin",
)
Import Config from thumbor.config, which re-exports
derpconf.config.Config. Its definition registry stays live, so a setting
registered while a configured plugin is imported becomes available to the
already loaded config.
An explicit value from thumbor.conf continues to take precedence over the
plugin default:
MY_PLUGIN_TIMEOUT = 10
LOADER = "my_plugin.loader"
Any uppercase name assigned in thumbor.conf is kept on the loaded
configuration even when it has no registered default. Registration is still
recommended because it supplies a default, description and group metadata.
Plugin code can read the resolved value through the configuration object it
receives directly or through context.config.
Storages
thumbor_aws
Thumbor is a smart imaging service. It enables on-demand crop, resizing and flipping of images.
AWS is a cloud service, providing - among other things - storage capabilities.
This module provides support for AWS S3 interconnection, as a loader, a storage and/or a result storage.
Installing:
pip install tc_aws
For complete, version-specific configuration, use the documentation in the plugin repository linked above.
thumbor_hbase
By Damien Hardy.
Thumbor is a smart imaging service. It enables on-demand crop, resizing and flipping of images.
Hbase is a column oriented database from the hadoop ecosystem.
This module provide support for Hadoop Hbase as large auto replicant key/value backend storage for images in Thumbor.
Installing:
pip install thumbor_hbase
Using it is simple, just change your configuration in thumbor.conf:
HBASE_STORAGE_SERVER_HOST = "localhost"
HBASE_STORAGE_SERVER_PORT = 9000
HBASE_STORAGE_TABLE = "storage-table"
HBASE_STORAGE_FAMILY = "storage-family"
If you want to use thumbor_hbase for loading original images, change your thumbor.conf to read:
LOADER = "thumbor_hbase.loader"
If you want to use thumbor_hbase for storage of original images, change your thumbor.conf to read:
STORAGE = "thumbor_hbase.storage"
thumbor_mongodb
By Damien Hardy.
Thumbor is a smart imaging service. It enables on-demand crop, resizing and flipping of images.
MongoDB is a document oriented NoSQL database.
This plugin for Thumbor is a loader that can reach images from a mongodb collection based on its Object(_id).
Installing:
pip install thumbor_mongodb
Using it is simple, just change your configuration in thumbor.conf:
LOADER = 'thumbor_mongodb.loader'
MONGO_LOADER_CNX_STRING = 'mongodb://mongodbserver01,mongodbserver02:27017'
MONGO_LOADER_SERVER_DB = 'thumbor'
MONGO_LOADER_SERVER_COLLECTION = 'images'
MONGO_LOADER_DOC_FIELD = 'content'
thumbor_riak
By Damien Hardy.
Riak is a distributed document oriented database implementing the consistent hashing algorithm from the Dynanmo publication by Amazon.
This module provide support for Riak as a large auto replicant key/value backend storage for images in Thumbor.
Installing:
pip install thumbor_riak(require thumbor)
Using it is simple, just change your configuration in thumbor.conf:
# Use riak for storage.
STORAGE = 'thumbor_riak.storage'
# Put the url for your riak install here
RIAK_STORAGE_BASEURL = "http://my-riak-install-base-url"
thumbor_rackspace
By David Mann.
This plugin allows users to store objects in the Rackspace cloud for result storage.
Installing:
pip install thumbor_rackspace
Using it is simple, just change your configuration in thumbor.conf:
# Use rackspace for result storage.
# For more info on result storage: https://github.com/thumbor/thumbor/wiki/Result-storage
RESULT_STORAGE = 'thumbor_rackspace.result_storages.cloudfile_storage'
# Pyrax Rackspace configuration file location
RACKSPACE_PYRAX_CFG = "/var/thumbor/.pyrax.cfg"
# Result Storage options
RACKSPACE_RESULT_STORAGE_EXPIRES = True # Set TTL on cloudfile objects
RACKSPACE_RESULT_STORAGES_CONTAINER = "cloudfile-container-name"
RACKSPACE_RESULT_STORAGES_CONTAINER_ROOT = "/"
thumbor_ceph
By Laurent Barbe.
Ceph a distributed object store designed to provide excellent performance, reliability and scalability.
This module provide support for Ceph RADOS as backend storage for images.
Installing:
apt-get install python-ceph && pip install thumbor_ceph
Configuration in thumbor.conf:
################################# File Storage #################################
STORAGE = 'thumbor_ceph.storages.ceph_storage'
CEPH_STORAGE_POOL = 'thumbor'
#################################### Upload ####################################
UPLOAD_PHOTO_STORAGE = 'thumbor_ceph.storages.ceph_storage'
################################ Result Storage ################################
RESULT_STORAGE = 'thumbor_ceph.result_storages.ceph_storage'
CEPH_RESULT_STORAGE_POOL = 'thumbor'
For monitors and keys, the values used are those defined in the configuration file ceph.conf.
thumbor_spaces
This plugin allows users to store objects in the DigitalOcean Spaces for result storage.
Installing:
pip install thumbor_spaces
Using it is simple, just change your configuration in thumbor.conf:
# Use DigitalOcean Spaces for result storage.
# For more info on result storage: https://github.com/thumbor/thumbor/wiki/Result-storage
RESULT_STORAGE = 'thumbor_spaces.result_storages.spaces_storage'
SPACES_REGION='xxx'
SPACES_ENDPOINT='xxx'
SPACES_KEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
SPACES_SECRET='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
SPACES_BUCKET='your-bucket-name'
Metrics
thumbor_prometheus
By Simon Effenberg.
Prometheus a monitoring and alerting toolkit.
This module provide support for Prometheus as metrics collector.
Installing:
pip install tc_prometheus
Configuration in thumbor.conf:
############################### Extensibility ###############################
METRICS = 'tc_prometheus.metrics.prometheus_metrics'
# optional with defaults
PROMETHEUS_SCRAPE_PORT = 8000 # Port the prometheus client should listen on
Extensions
thumborshortener
Thumbor is a smart imaging service. It enables on-demand crop, resizing and flipping of images.
This module provides URL shortening capabilities for Thumbor. It will create an API that can shorten a thumbor URL, and then routing capabilities to reroute the shortened URL to the correct image.
The shortened URL / real URL mapping is stored within redis.
Installing:
pip install tc_shortener
To get exhaustive details about configuration options & setting it up, go to the plugin documentation.
Engines
thumbor-video-engine
By The Atlantic.
This engine extends thumbor so that it can read, crop, and transcode audio-less video files using FFmpeg. It supports input and output of animated GIF, animated WebP, WebM (VP9) video, and MP4 (H.264 and H.265).
Installing:
pip install thumbor-video-engine
Configuration in thumbor.conf:
ENGINE = 'thumbor_video_engine.engines.video'
FILTERS = [
# Enables transcoding between video formats (in addition to the image
# formats already supported by thumbor.filters.format)
'thumbor_video_engine.filters.format',
# Allows outputting a still frame from a video as an image
'thumbor_video_engine.filters.still',
]
# optional, if you are already using a custom image engine
IMAGING_ENGINE = 'opencv_engine'
For a full list of configuration options and filters, read the project’s documentation.