Function: To Avif

This converts files passed in as arguments to the avif format. It requires avifenc to be installed. In Ubuntu you can install it with

sudo apt install libavif-bin

To AVIF

function toavif --description 'Convert image files to avif with avifenc'

    for SOURCE_IMAGE in $argv
        set OUTPUT (path change-extension avif $SOURCE_IMAGE)
        avifenc $SOURCE_IMAGE -o $OUTPUT
    end
end