Hi,
Is there a way to use AVIF Native on Umbraco or is there a way to convert them on upload to jpg or webp, so a custome dose not have to use Photoshop or Gimp to convert them on there pc before using them on there site.
Thanks
Darren
Hi,
Is there a way to use AVIF Native on Umbraco or is there a way to convert them on upload to jpg or webp, so a custome dose not have to use Photoshop or Gimp to convert them on there pc before using them on there site.
Thanks
Darren
Nothing out of the box that convert these. You should be able to allow AVIF uploads by amending the appSettings:
"Umbraco": {
"CMS": {
"Content": {
"Imaging": {
"ImageFileTypes": [ "jpeg", "jpg", "gif", "bmp", "png", "tiff", "tif", "webp", "avif" ]
}
}
}
}
If you wanted to convert these, you would need to write a MediaSavingNotification notification handler and use a third-party image library to convert the file on upload (I don’t believe ImageSharp supports AVIF files).
Justin
If you have Cloudflare you can enable Cloudflare Image Transformations for AVIF support. More info CloudflareImageUrlGenerator | Umbraco Marketplace
Thanks Justin, just upgraded to the lasted 17 Build and changed my config and your solution works.