Archived topic
AVIF support in Generatepress
8 replies · Started by Rachel on March 15, 2021
Hi,
How are you lovely guys?
Yes, I know a plugin should do images conversions 😀.
It is interestingly hard to make the theme faster and I am not saying Generatepress should do the image conversions as I can convert images online to AVIF/Webp or in the future batch conversion with Pixelmator Pro.
My issue is that I have to use custom code and link it 3 times to jepg, Webp and AVIF. (Custom php code to allow the upload) it would be cool if I can select a feature image and the theme could link it to the same named files allowed the upload and serve all the three file formats (no conversion needed).
Even if plugins like optimole and others support it, I wouldn’t need a plugin for it.
I think that would be a unique feature other themes don’t have and would increase performance.
Jepg 120 , Webp 90 kbs, AvIF 40 kbs.
Would that be something you do?
Thank you
Oh I meant increasingly hard not interestingly
Hi there,
The plugins that perform this kind of service provide dedicated servers for the conversion, compression and CDN delivery of the various image sources. Which is why they are so popular as they take away all the complexities ( and overhead ) of generateing and storing multiple image formats and correcting the image HTML on the fly.
To do it automatically without a 3rd party service would require that functionality to be installed on your server. As every server configuration is different there isn't any simple method to incorporate this in a plug and play kind of way. There are some webP plugins that provide local conversion but setting them up is not easy.
Forever hopeful that Browser support for these new technologies will become the norm and we can all get back to 1 image format :)
Thank you David for the explanation.
I wouldn’t bother with conversion and deliverability (bunnycdn) as I could do both of them and I could store them on my server would be great if the linking would work automatically if I choose feature image and the jepg version. And the theme could link it to the other versions.
It would be cool to have only avif but I guess older devices does not support them
Avif is currently only supported on Chrome and Opera. And no timeline for other browsers yet.
Unfortunately it's not a simple case of inserting all relevant links into the code the Theme outputs ( which is actually performed by a core WP function - the theme just makes the function call with some parameters ) - theres a lot of server level stuff going on - good article on that here:
And this plugin author actually breaks down the libraries he is using:
Thank you for the explanation.
I have read that it comes to safari too. At least there are traces...
https://bugs.webkit.org/show_bug.cgi?id=207750
Hopefully it will be only one format.
Have a great day
David
Fingers crossed :)
You too!
Optimole has that on their roadmap. The support came back to me.
Thats good to hear :) Thanks for the update!