Skip to content

Conversation

@Stormheg
Copy link
Member

See @laymonage's comment: python-pillow/Pillow#8886 (comment)
This applies the fix proposed on that discussion by Andrew Murray - thank you

Also pinning pillow_heif for now so our users don't end up pulling in a version of that package that no longer has AVIF support. We should either move to https://github.com/fdintino/pillow-avif-plugin (unsure what the future of that plugin looks like now that AVIF support has technically shipped in Pillow) or wait for Pillow 11.3.0 due for release next quarter which has the potential of shipping full AVIF support

See also #167 for more background

Pillow 11.2.1 added native AVIF support but it requires building Pillow
from source to work correctly. Unfortunately, depending on the order of
imports, the 'incomplete' AVIF implementation of Pillow is used instead
of pillow_heif.

Add a test to confirm this scenario.
Thanks to Andrew Murray for the suggestion!
When pillow_heif v0.23 will be released AVIF support will no longer be
included as Pillow now has it natively. We still rely on pillow_heif for
our AVIF support since the Pillow 11.2.1 wheels don't include the
necessary binaries.

See also: wagtail#166
@Stormheg Stormheg mentioned this pull request Apr 22, 2025
Copy link
Collaborator

@zerolab zerolab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zerolab zerolab added the component: Dependencies Pull requests that update a dependency file label Apr 22, 2025
@Stormheg Stormheg merged commit 9b26b2f into wagtail:main Apr 22, 2025
7 checks passed
@Stormheg Stormheg deleted the fix/pillow-11.2.1-avif-support branch April 22, 2025 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: Dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants