• Resolved hungpham

    (@hungpham)


    I have 2 local fonts, already use header: access-control-allow-origin: *
    However, checking with Pingdom, the fonts are always loaded from the original server. If I disable Optimize CSS feature, then the fonts will be served from CDN normally.

    For CDN connection, I am using WP Fastest Cache.

    Any idea why Optimize CSS feature prevents fonts loaded from CDN?

    Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    That’s explained in the FAQ actually @hungpham;

    Why aren’t my fonts put on the CDN as well?

    Autoptimize supports this, but it is not enabled by default because non-local fonts might require some extra configuration. But if you have your cross-origin request policy in order, you can tell Autoptimize to put your fonts on the CDN by hooking into the API, setting autoptimize_filter_css_fonts_cdn to true this way;

    add_filter('autoptimize_filter_css_fonts_cdn',__return_true);

    hope this helps,
    frank

Viewing 1 replies (of 1 total)

The topic ‘Font with CDN’ is closed to new replies.