wp-media / wp-rocket

Performance optimization plugin for WordPress
https://wp-rocket.me
GNU General Public License v2.0
701 stars 218 forks source link

Disable Google Fonts Optimization module when Cloudflare APO is enabled #5702

Open pedddro opened 1 year ago

pedddro commented 1 year ago

Is your feature request related to a problem? Please describe. Cloudflare APO currently strips Google fonts from Google and hosts them locally. The preconnect links are unnecessary.

Describe the solution you'd like Disable Gfonts optimization when APO is in use to remove the unnecessary preconnect links.

Describe alternatives you've considered

Additional context There are already warning messages and detection code for APO in Wp Rocket, I guess it would be easy to add this feature.

pedddro commented 1 year ago

Cloudflare will add a new Google fonts optimization free product, probably also good to recognize when a user is using it and disable the preconnects.

thekendog commented 1 year ago

Cloudflare will add a new Google fonts optimization free product, probably also good to recognize when a user is using it and disable the preconnects.

Yeah I've started using Cloudflare fonts and a simple setting to disable the Google fonts optimization is badly needed. Right now I have to remove the resource hint using a filter and then also disable the option using WP-CLI. I deal with A LOT of sites and a checkbox toggle to turn it off would make things much easier.