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.
I’ve been using the
WebP Converter for Media – Convert WebP & Optimize Images – WordPress plugin | WordPress.org plugin for the Media Library with Bedrock and it’s working well for me so far, but for the theme images I haven’t found a way.
The WP Rocket plugin offers a solution with WP Smush, but it’s quite expensive, I’d rather have a free solution.
Anyone looked into this ? I’ve read some old topics about it but could not find a good solution.
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.
Which CDN / Solution would you recommend ?
9.x update branch may be interesting:
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 setup…
It updates Sage 9.x to webpack 5 and also updates the other dependencies.
Thanks for the suggestion
Sadly the current projects I’m referring to are in production, I cannot update them, I need to add this in existing Sage projects.
This topic was automatically closed after 42 days. New replies are no longer allowed.