默认监听 8888 端口;AI 智能裁剪需额外安装 OpenCV 依赖(pip install thumbor[opencv]);遇到问题可用 thumbor-doctor 诊断
pip install thumbor
thumborREADME 未说明
开源按需图片处理 HTTP 服务,通过 URL 参数实时裁剪、缩放和优化图片
开源的图片缩略图服务,支持裁剪、缩放、加水印和格式转换,可处理 JPEG、PNG、WebP、AVIF、GIF 等格式,适合为网站搭建独立的图片处理后端。
核心能力
- 通过 URL 路径参数按需生成任意尺寸图片
- 用 AI 人脸与特征检测实现智能裁剪
- 内置缓存加速图片处理
- 支持本地存储、S3、Ceph 等多种存储后端
- 提供过滤器与自定义扩展机制
容易踩的坑
- 7.8.0Release 7.8.0最新正式版2026-05-30 · 2026-05-30 23:26 UTC
Security
This release includes fixes for multiple privately reported security issues. Users running thumbor in production are strongly encouraged to upgrade to 7.8.0.
Fixed issues include:
- file_loader path confinement bypasses that could allow reads outside FILE_LOADER_ROOT_PATH in affected configurations.
- URL signature validation bypass involving repeated or encoded hash prefixes.
- ALLOWED_SOURCES pattern hardening for string-based source restrictions.
- Denial of service fixes in the convolution filter.
- Denial of service fix in the proportion filter.
Security advisories will be published with more details and CVE/GHSA references.
What's Changed
- Remove deprecated license classifier in favor of SPDX expression by @marcelometal in https://github.com/thumbor/thumbor/pull/1738
- Bump CairoSVG to 2.8.2 by @marcelometal in https://github.com/thumbor/thumbor/pull/1737
- Bump setuptools to >=78.1.1 by @marcelometal in https://github.com/thumbor/thumbor/pull/1736
- Expand Pillow version range to allow versions up to <12.0.0 by @marcelometal in https://github.com/thumbor/thumbor/pull/1732
- Fix SyntaxWarning for invalid escape sequence in byte regex by @marcelometal in https://github.com/thumbor/thumbor/pull/1741
- Update base image from bullseye to trixie by @marcelometal in https://github.com/thumbor/thumbor/pull/1748
- chore(deps): bump actions/checkout from 4 to 5 by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1749
- chore(deps): bump actions/download-artifact from 4 to 5 by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1750
- chore(deps): bump pypa/gh-action-pypi-publish from 1.12.4 to 1.13.0 in /.github/workflows by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1752
- Drop support for Python 3.9 by @marcelometal in https://github.com/thumbor/thumbor/pull/1747
- chore(deps): bump actions/stale from 9 to 10 by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1759
- chore(deps): bump actions/setup-python from 5 to 6 by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1758
- Remove legacy .continuousrc file by @marcelometal in https://github.com/thumbor/thumbor/pull/1756
- Remove duplicate test file by @sephii in https://github.com/thumbor/thumbor/pull/1754
- Migrate legacy issue template to new YAML-based format by @marcelometal in https://github.com/thumbor/thumbor/pull/1755
- Use full SHA for third-party actions by @marcelometal in https://github.com/thumbor/thumbor/pull/1761
- Update pre-commit hooks to latest versions by @marcelometal in https://github.com/thumbor/thumbor/pull/1767
- chore(deps): bump actions/download-artifact from 5 to 6 by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1769
- chore(deps): bump docker/login-action from 3.0.0 to 3.6.0 by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1770
- chore(deps): bump github/codeql-action from 3 to 4 by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1772
- chore(deps): bump docker/build-push-action from 5.0.0 to 6.18.0 by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1771
- chore(deps): bump psf/black from 25.9.0 to 25.11.0 by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1778
- chore(deps): bump docker/setup-buildx-action from 3.0.0 to 3.11.1 by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1777
- chore(deps): bump actions/download-artifact from 6 to 7 by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1782
- chore(deps): bump docker/metadata-action from 5.0.0 to 5.10.0 by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1783
- chore(deps): bump actions/upload-artifact from 4 to 6 by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1787
- chore(deps): bump docker/login-action from 3.6.0 to 3.7.0 by @dependabot[bot] in https://github.com/thumbor/thumbor/pull/1786
- chore(deps): bump docker/setup-qemu-action from 3.6.0 to 3.7.0 b
- 7.7.7Release 7.7.72025-05-15 · 2025-05-15 16:32 UTC
查看更新说明
What's Changed
- Remove non-DFSG-compliant image: 800px-A_small_cup_of_coffee.JPG by @marcelometal in https://github.com/thumbor/thumbor/pull/1734
Full Changelog: https://github.com/thumbor/thumbor/compare/7.7.6...7.7.7
- 7.7.6Release 7.7.62025-05-09 · 2025-05-09 19:10 UTC
查看更新说明
What's Changed
- Remove Debian/Ubuntu ppa-repo from documentation by @mkobel in https://github.com/thumbor/thumbor/pull/1707
- chore(deps): bump pypa/cibuildwheel from 2.23.2 to 2.23.3 by @dependabot in https://github.com/thumbor/thumbor/pull/1723
- chore: updated ubuntu release version by @RaphaelVRossi in https://github.com/thumbor/thumbor/pull/1724
- Remove perf folder and related configurations by @marcelometal in https://github.com/thumbor/thumbor/pull/1729
- Add copyright holder and license for weird_normalize_error.jpg by @marcelometal in https://github.com/thumbor/thumbor/pull/1726
- README: Use http instead of https for localhost access by @marcelometal in https://github.com/thumbor/thumbor/pull/1728
- Replace test image in test_should_return_original_image_size by @marcelometal in https://github.com/thumbor/thumbor/pull/1730
- Add support to Python 3.13 by @marcelometal in https://github.com/thumbor/thumbor/pull/1725
- Replace and clean up documentation images by @marcelometal in https://github.com/thumbor/thumbor/pull/1727
- Remove shebang from non-executable Python files by @marcelometal in https://github.com/thumbor/thumbor/pull/1731
Full Changelog: https://github.com/thumbor/thumbor/compare/7.7.5...7.7.6
- 7.7.5Release 7.7.52025-04-05 · 2025-04-05 01:12 UTC
查看更新说明
What's Changed
- Bump pypa/cibuildwheel from 2.16.5 to 2.17.0 by @dependabot in https://github.com/thumbor/thumbor/pull/1661
- Bump pypa/gh-action-pypi-publish from 1.8.12 to 1.8.14 by @dependabot in https://github.com/thumbor/thumbor/pull/1662
- Bump pypa/cibuildwheel from 2.17.0 to 2.18.1 by @dependabot in https://github.com/thumbor/thumbor/pull/1670
- Bump coverallsapp/github-action from 2.2.3 to 2.3.0 by @dependabot in https://github.com/thumbor/thumbor/pull/1669
- Fix lint warnings by @marcelometal in https://github.com/thumbor/thumbor/pull/1671
- chore: Update to latest Pillow version 10.2.0 by @guilhermef in https://github.com/thumbor/thumbor/pull/1657
- chore(deps): bump pypa/gh-action-pypi-publish from 1.8.14 to 1.10.0 by @dependabot in https://github.com/thumbor/thumbor/pull/1686
- Silence pylint errors by @marcelometal in https://github.com/thumbor/thumbor/pull/1698
- Proposal to Add a Thumbor Client Library for Node.js and Browsers (SSR friendly) by @azabroflovski in https://github.com/thumbor/thumbor/pull/1663
- chore: add setuptools as required dependency by @RaphaelVRossi in https://github.com/thumbor/thumbor/pull/1699
- chore(deps): bump coverallsapp/github-action from 2.3.0 to 2.3.6 by @dependabot in https://github.com/thumbor/thumbor/pull/1713
- chore(deps): bump pypa/gh-action-pypi-publish from 1.10.0 to 1.12.4 by @dependabot in https://github.com/thumbor/thumbor/pull/1715
- chore(deps): bump pypa/cibuildwheel from 2.18.1 to 2.23.0 by @dependabot in https://github.com/thumbor/thumbor/pull/1718
- avoid metrics with the same name causing exception in prometheus registry by @mkobel in https://github.com/thumbor/thumbor/pull/1720
- chore(deps): bump pypa/cibuildwheel from 2.23.0 to 2.23.2 by @dependabot in https://github.com/thumbor/thumbor/pull/1721
- Fix setting minimal height for no_upscale filter by @crisp-tweakers in https://github.com/thumbor/thumbor/pull/1703
New Contributors
- @azabroflovski made their first contribution in https://github.com/thumbor/thumbor/pull/1663
- @mkobel made their first contribution in https://github.com/thumbor/thumbor/pull/1720
- @crisp-tweakers made their first contribution in https://github.com/thumbor/thumbor/pull/1703
Full Changelog: https://github.com/thumbor/thumbor/compare/7.7.4...7.7.5
- 7.7.4Release 7.7.42024-03-04 · 2024-03-04 20:46 UTC
查看更新说明
What's Changed
- chore: Reformat files according to new Black Code Style by @scorphus in https://github.com/thumbor/thumbor/pull/1644
- chore(release): Update to download-artifact and upload-artifact v4 by @guilhermef in https://github.com/thumbor/thumbor/pull/1645
- Bump pypa/cibuildwheel from 2.16.2 to 2.16.5 by @dependabot in https://github.com/thumbor/thumbor/pull/1646
- Bump github/codeql-action from 2 to 3 by @dependabot in https://github.com/thumbor/thumbor/pull/1635
- feat(engines/pil.read_multiple): Use Pillow to save multipage images as GIF by @scorphus in https://github.com/thumbor/thumbor/pull/1643
- feat: enable auto-png configuration by @RaphaelVRossi in https://github.com/thumbor/thumbor/pull/1652
- Bump pypa/gh-action-pypi-publish from 1.8.11 to 1.8.12 by @dependabot in https://github.com/thumbor/thumbor/pull/1655
Full Changelog: https://github.com/thumbor/thumbor/compare/7.7.3...7.7.4
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
thumbor is a smart imaging service that enables on-demand cropping, resizing, applying filters and optimizing images.
Cropping photos automatically can be a frustrating experience with severed heads involved. thumbor uses AI for smart detection.
thumbor is an HTTP server and you can create as many different images as you want just by varying path parameters:
http://<thumbor-server>/300x200/smart/thumbor.readthedocs.io/en/latest/_images/logo-thumbor.png
You should see an image of the thumbor logo in 300x200.
Learn more about all you can do in thumbor's documentation.
⚙️ Installation
Decide which installation option you want to use.
Option 1: pip
# thumbor with main dependencies only
pip install thumbor
# thumbor with OpenCV dependency
pip install thumbor[opencv]
# thumbor with all dependencies
pip install thumbor[all]
Option 2: Binary
Available as a package in the official repositories of distributions such as Debian and Ubuntu.
sudo apt update
sudo apt install thumbor
Option 3: Docker
An official Docker image is available on GitHub Container Registry:
docker run -p 8888:8888 ghcr.io/thumbor/thumbor:latest
For more information about the Docker image and available tags, visit the GitHub Container Registry.
For more ways, please check out Installation.
Development
Sync the development environment, install the pre-commit hooks, and run the test suite:
make setup
make pre-commit # only needed once per clone
make compile_ext
make test
make setup uses an existing uv installation
or installs the pinned version into .uv-venv when uv is not available.
The development environment is stored in .venv. Use make run to start
thumbor from this environment.
The lockfile is managed with uv lock and should be committed when
dependencies change.
Run
Running an installed copy is as easy as:
thumbor
From a development checkout, use make run instead.
After this, you can reach it on http://localhost:8888/unsafe/https://raw.githubusercontent.com/thumbor/thumbor/master/example.jpg
Troubles?
If you experience any troubles, try running:
thumbor-doctor
From a development checkout, run the same commands through
uv run --locked thumbor-doctor.
If you have a thumbor.conf file, you can use that to help thumbor-doctor:
thumbor-doctor -c thumbor.conf
If you still need help, please raise an issue. Remember to send your thumbor-doctor output in the issue:
thumbor-doctor --nocolor -c thumbor.conf
🎯 Features
- supports all common images formats out of the box
- intelligent cropping and resizing
- blazing fast using caching
- supports many storages (local storage, AWS S3, Rackspace, Ceph, ...)
- AI-powered cropping based on face and feature detection (glasses, interesting points, ...)
- integrated with many programming languages and frameworks and many more...
- highly extensible
🌟 Awesome Goodies
awesome-thumbor is a curated list of all things thumbor. There you can find filters, storages, engines, loaders, docker images, extensions in your favorite language and framework, and much more.
All of it with a clear indication of each project's quality. Have fun!
👍 Contribute
thumbor is an open-source project with many contributors. Join them contributing code or contributing documentation.
If you use thumbor, please take 1 minute and answer this survey? Only 2 questions!
Join the chat at https://gitter.im/thumbor/thumbor
👀 Demo
You can see thumbor in action at http://thumborize.me/