Add optional AVIF decoding support#3043
Add optional AVIF decoding support#3043kleinesfilmroellchen wants to merge 1 commit intogetzola:nextfrom
Conversation
0e039b2 to
db80a8e
Compare
|
Okay so it turns out that Ubuntu 22 has too old of a libdav1d version for this. What else is new, Canonical. I’ll add Ubuntu 24 CI which only builds with AVIF support to cut down the build times as much as possible. |
79c7a37 to
5af09e5
Compare
This comment was marked as outdated.
This comment was marked as outdated.
4ed06f0 to
09341f8
Compare
|
@Keats are there any issues with this change? I only noticed today that this hasn’t been addressed yet at all. |
This is behind the `load-avif` feature flag. Test this in CI on Ubuntu. I have also tested it with musl but that would require an actual Alpine runner for the properly-built libdav1d.
09341f8 to
9ed7806
Compare
|
As mentioned in the comment, the feature needs to work for all supported platforms (windows/mac/linux) by default |
The feature is optional. Is it still a requirement? As stated, Ubuntu 22 simply has too old of a libdav1d to ever work. I can’t personally test macOS or Windows outside of CI. |
|
The whole point here is to give distributors the ability to enable AVIF support, with whatever mechanisms and extra work they need on their platform. As of now, no platform can enable this support even if they want to. |
Yeah. I want someone to be able to pull a repo on Windows/Mac/Linux and be able to run the site. Dictionaries for search are an exception as features because of the size but they are not platform dependent. |
|
I’m interested in getting some help here, then. I can do some limited testing on macOS and Windows, but I don’t have a proper machine for either of those. For Linux there is also the issue that this makes zola incompatible with distros which ship ancient versions of libdav1d, notably Ubuntu 22. I’m not sure what other major (and currently supported) distro is affected, though. |
|
So from the little research I have done:
If someone wants to extend my PR to implement all of this in a build or package script, please go ahead. |
As per #1202 (comment), this adds AVIF decoding, but as an optional feature (similar to native TLS) which is off by default, keeping the official release build entirely self-contained. Distribution packagers are strongly recommended to enable the feature and make their
zolapackage depend on theirlibdav1dpackage.This doesn’t add tests for AVIF loading. It would be possible to merge this somehow with the feature, but it seems like wasted effort: even more changes to CI, and we generally expect
imageto work according to their documentation. (We don’t add any special code of our own to load AVIF files, after all.)Should close #1202, unless there is a native Rust AVIF loader that we could use instead (In which case, close this PR, but I have looked and not found any).
IMPORTANT: Please do not create a Pull Request adding a new feature without discussing it first.
The place to discuss new features is the forum: https://zola.discourse.group/
If you want to add a new feature, please open a thread there first in the feature requests section.
Sanity check:
Code changes
(Delete or ignore this section for documentation changes)
nextbranch?If the change is a new feature or adding to/changing an existing one: