Thanks for the kind words, @johanneseva!
Just thought I’d chime in since you mentioned the AVIF image format:
Upcoming changes to both Google Chrome and Firefox — improved standards compliance via libavif
— are going to cause a lot of previously-working AVIF images to stop rendering in the browser. (AVIF files have a lot of redundant metadata that many encoders had previously ignored, but now decoding requires (some of) them.)
If you have AVIF images in use on any of your web sites, I’d recommend installing Google Chrome Beta (v.91
) and visiting those pages in that browser to make sure the images still load correctly.
If you do end up needing to regenerate the assets, and if you’re on Linux (or are used to building Rust software from source on Mac), you can Google “Blobfolio refract” — I don’t want to get scolded for linking directly, haha — and it should return the Github repository for our guided image encoding software Refract, which tackles WebP, AVIF, and JPEG XL conversions.
AVIFs made with Refract are fully standards compliant and will load A-OK in the upcoming browser releases.
@johanneseva how did you manage to upload avif files?
Im not able to do it =( Can you point me on the right direction or the steps to do it?
Many thanks
Hi @kyllaz,
LotF
only assists with file type recognition (so e.g. WordPress doesn’t get confused and mistakenly block a file); it doesn’t add or subtract from the specific file types a given WordPress site allows to be uploaded.
To whitelist AVIF files for your site, you need to add them to the allowed list.
If you are able to write changes to your theme, you can add something like the following to functions.php
:
/**
* Enable AVIF Uploads
*
* @param array $mimes Allowed MIME types.
* @returns array Allowed MIME types.
*/
function allow_avif_uploads($mimes) {
$mimes['avif'] = 'image/avif';
return $mimes;
}
add_filter('upload_mimes', 'allow_avif_uploads');
Thanks for your quick reply @blobfolio
It’s working great=)