My use case is that I want to have a shortcode to create a <picture> element, but I want to only insert code for files that already exist (the rules for when I use webp or avif are not so easy to express in a static generator and I prefer to handle them separately).
get_file_metadata kind of works as a proxy, but avif support is flaky and I actually don’t care about the metadata, so only checking for the file would be more efficient.
Probably it is a very obscure use-case. Sadly, AVIF support is broken in the image crate that zola uses to read the metadata, but I’ll try look into collaborating with that.