fix: upgrade Pillow to 12.x for native AVIF support #27

Merged
mark merged 1 commits from fix/pillow-avif-support into main 2026-03-02 16:15:54 +00:00
Owner

Problem

Uploading .avif files in the Wagtail editor returned a 500 error, even after PR #26 added libavif-dev to the Dockerfile.

Root Cause

Pillow~=11.0.0 pinned to the 11.0.x series, which does not include native AVIF support — that was added in Pillow 11.1.0. The libavif-dev system package had no effect because pip installs pre-compiled wheels that bundle their own codec libraries.

Fix

Bump Pillow to ~=12.1 (latest stable, 12.1.1). This version ships native AVIF encoding/decoding in its PyPI wheels.

Verified inside the container:

  • avif: True in Pillow features, modules, and registered extensions
  • All tests pass (95% coverage)
## Problem Uploading .avif files in the Wagtail editor returned a 500 error, even after PR #26 added `libavif-dev` to the Dockerfile. ## Root Cause `Pillow~=11.0.0` pinned to the 11.0.x series, which does **not** include native AVIF support — that was added in Pillow 11.1.0. The `libavif-dev` system package had no effect because pip installs pre-compiled wheels that bundle their own codec libraries. ## Fix Bump Pillow to `~=12.1` (latest stable, 12.1.1). This version ships native AVIF encoding/decoding in its PyPI wheels. Verified inside the container: - `avif: True` in Pillow features, modules, and registered extensions - All tests pass (95% coverage)
mark added 1 commit 2026-03-02 16:11:55 +00:00
fix: upgrade Pillow to 12.x for native AVIF support
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / deploy (pull_request) Has been skipped
CI / pr-e2e (pull_request) Successful in 1m38s
CI / ci (pull_request) Successful in 2m9s
0818f71566
Pillow 11.0.x did not include native AVIF support — that was added in
11.1.0. The ~=11.0.0 pin restricted upgrades to 11.0.x, so the
libavif-dev system package installed in the Dockerfile was never used
(pip installs pre-compiled wheels that bundle their own libraries).

Bump to Pillow ~=12.1 which ships native AVIF encoding/decoding in its
PyPI wheels out of the box.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mark merged commit 17d30a4073 into main 2026-03-02 16:15:54 +00:00
mark deleted branch fix/pillow-avif-support 2026-03-02 16:15:54 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nohype/main-site#27