Skip to content

Commit 032b42d

Browse files
committed
Enable AUTO_WEBP by default, add AUTO_AVIF as opt-in
Configurable via THUMBOR_AUTO_WEBP and THUMBOR_AUTO_AVIF env vars.
1 parent 71a9430 commit 032b42d

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 0.3.2 (unreleased)
4+
5+
- Enable AUTO_WEBP by default for automatic WebP conversion when browser
6+
supports it. AUTO_AVIF available as opt-in. Both configurable via
7+
`THUMBOR_AUTO_WEBP` and `THUMBOR_AUTO_AVIF` environment variables.
8+
39
## 0.3.1 (2026-03-09)
410

511
- Fix ruff lint/format errors that blocked CI.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ The image is automatically rebuilt weekly when a new Thumbor version appears on
9797
| `PGTHUMBOR_S3_BUCKET` | `""` | S3 bucket for blob fallback (empty = disabled) |
9898
| `PGTHUMBOR_S3_REGION` | `us-east-1` | S3 region |
9999
| `PGTHUMBOR_S3_ENDPOINT` | `""` | S3 endpoint for MinIO/Ceph (empty = AWS) |
100+
| `THUMBOR_AUTO_WEBP` | `"true"` | Auto-convert to WebP when browser supports it |
101+
| `THUMBOR_AUTO_AVIF` | `"false"` | Auto-convert to AVIF when browser supports it |
100102
| `PGTHUMBOR_PLONE_AUTH_URL` | `""` | Plone internal URL for auth (empty = disabled) |
101103
| `PGTHUMBOR_AUTH_CACHE_TTL` | `60` | Auth cache TTL in seconds |
102104
| `PGTHUMBOR_CACHE_CONTROL_AUTHENTICATED` | `private, max-age=86400` | Cache-Control for authenticated images (browser-only, no proxy caching) |

thumbor.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ if os.environ.get("PGTHUMBOR_PLONE_AUTH_URL"):
1212
SECURITY_KEY = os.environ.get("THUMBOR_SECURITY_KEY", "CHANGE-ME")
1313
ALLOW_UNSAFE_URL = os.environ.get("ALLOW_UNSAFE_URL", "False").lower() == "true"
1414

15+
# Auto-convert to modern formats when browser supports them (enabled by default)
16+
AUTO_WEBP = os.environ.get("THUMBOR_AUTO_WEBP", "true").lower() in ("true", "1", "yes")
17+
AUTO_AVIF = os.environ.get("THUMBOR_AUTO_AVIF", "false").lower() in ("true", "1", "yes")
18+
1519
# Storage (Thumbor result cache — file-based for simplicity)
1620
RESULT_STORAGE = "thumbor.result_storages.file_storage"
1721
RESULT_STORAGE_FILE_STORAGE_ROOT_PATH = os.environ.get(

0 commit comments

Comments
 (0)