How does f=auto choose between AVIF and WebP?
By the request's Accept header. It picks AVIF when the header names
image/avif, in any letter case and not with q=0. Wildcards such as
image/* or */*, or no Accept at all, get WebP.
More: Image delivery, f=auto