With Google Page Speed Insights now requiring a next-gen images formats (webp or avif) to get a good score, I’m looking for a way to get Sage to automatically generate (and serve?) webp images of the theme.
You’ll have to modify the webpack config in Sage 9 to pull it off, but does this help?
I’m not a fan of image compression or optimization being done at the theme level anymore and would suggest looking into a image CDN service to just automate this sort of thing
Thanks for your answer @ben , I will have a look into it and post my solution.
Since image compression is included by default in Sage 9 when doing a production build, I thought it would be the way to go. And it’s always possible to add CDN on top of it.
Note: Changed Sage 9.2 to 9.1 (as 9.0.10 is the current release in master).
Updated Sage 9.x
You can now try out the Sage PR branch for webpack 5 and updated dependencies.
The sage-installer which is used by Sage 9.x for adding framework support was also updated to add the right configuration and styles. Bootstrap 5 (Beta2) has been added for selection. Tailwind 2 is used now.
Trying it out now!
To prevent siloing of existing working forks of Sage 9 + (insert framework), please try this set…
It updates Sage 9.x to webpack 5 and also updates the other dependencies.
Thanks for the suggestion @srarsis !
Sadly the current projects I’m referring to are in production, I cannot update them, I need to add this in existing Sage projects.