thumbor

thumborMIT活跃维护

开源的图片缩略图服务,支持裁剪、缩放、加水印和格式转换,可处理 JPEG、PNG、WebP、AVIF、GIF 等格式,适合为网站搭建独立的图片处理后端。

thumbor is an open-source photo thumbnail service by globo.com

7.8.0发布于 2026-05-30 23:26 UTC10,532star863fork同步于 2026-11-10 17:30 UTC

怎么上手

由 README 提炼,执行前请确认
pip install thumbor
thumbor
硬件要求按 README 说明

README 未说明

有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

开源按需图片处理 HTTP 服务,通过 URL 参数实时裁剪、缩放和优化图片

开源的图片缩略图服务,支持裁剪、缩放、加水印和格式转换,可处理 JPEG、PNG、WebP、AVIF、GIF 等格式,适合为网站搭建独立的图片处理后端。

核心能力

  • 通过 URL 路径参数按需生成任意尺寸图片
  • 用 AI 人脸与特征检测实现智能裁剪
  • 内置缓存加速图片处理
  • 支持本地存储、S3、Ceph 等多种存储后端
  • 提供过滤器与自定义扩展机制

容易踩的坑

默认监听 8888 端口;AI 智能裁剪需额外安装 OpenCV 依赖(pip install thumbor[opencv]);遇到问题可用 thumbor-doctor 诊断

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本7.8.0
  1. 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

  2. 7.7.7Release 7.7.72025-05-15 · 2025-05-15 16:32 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/thumbor/thumbor/compare/7.7.6...7.7.7

  3. 7.7.6Release 7.7.62025-05-09 · 2025-05-09 19:10 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/thumbor/thumbor/compare/7.7.5...7.7.6

  4. 7.7.5Release 7.7.52025-04-05 · 2025-04-05 01:12 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/thumbor/thumbor/compare/7.7.4...7.7.5

  5. 7.7.4Release 7.7.42024-03-04 · 2024-03-04 20:46 UTC
    查看更新说明

    What's Changed

    Full Changelog: https://github.com/thumbor/thumbor/compare/7.7.3...7.7.4

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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/