Support » Plugin: Image optimization & Lazy Load by Optimole » Load local fonts via Optimole CDN

  • Resolved sigagan

    (@sigagan)


    Hi,

    Thanks for the plugin. A very comprehensive all in one optimisation solution.

    Is it possible to load local fonts from my server via the Optimole CDN? Just like the JS/css/images.

    Regards,
    Gagan

    • This topic was modified 1 month, 3 weeks ago by sigagan.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Vytis

    (@bvytis)

    Hi Gagan,

    Thank you for your feedback about our plugin and for using Optimole.

    If your fonts are enqueued not via CSS files – they won’t be served by Optimole as the plugin only has an option to serve CSS and JS files via CDN.

    Best regards,
    Vytis

    Thread Starter sigagan

    (@sigagan)

    Hi @bvytis,

    Thanks for getting back. The fonts files are enqueued via CSS. However the fonts files are loaded as a url from the web server.

    Prior to using Optimole, I had a separate CDN and a separate image optimiser. I switched to Optimole as it is an “all in one” solution with minimal maintenance.

    So now all the images, css and js files get served from Optimole CDN. Is it possible to include the fonts as a future enhancement?

    Regards,
    Gagan

    • This reply was modified 1 month, 3 weeks ago by sigagan.
    Plugin Support Vytis

    (@bvytis)

    Hi @sigagan,

    Can you please share a screenshot of how your fonts are enqueued in the CSS files (one example is enought)? Are I don’t see that on your website.

    Thanks!

    Thread Starter sigagan

    (@sigagan)

    Hi @bvytis,

    The CSS is inline in the site HTML. It is not a separate file. I am fine with this and I understand that this means that the CSS is loaded from the web server and not Optimole CDN.

    Then, the custom fonts are loaded from within this inline css from url https://www.stokai.com/wp-content/Lfonts/ubuntu-normal-300.woff2. Moving the CSS into file instead of inline will cause the css to be loaded from Optimole CDN, agreed, but it will not move the fonts URL to Optimole CDN.

    You can find the relevant css and font url if you search for the above url in source.

    Thanks for looking into this, and let me know if you need more info.

    Regards,
    Gagan

    Plugin Support Vytis

    (@bvytis)

    Hi @sigagan,

    We have checked with the development team about this and we do not process the fonts from HTML to avoid issues with the file paths.
    It is something possible to improve but considering that it might cause issues in some cases and we already process the fonts from the served CSS/JavaScript feature we probably won’t add this possibility at least for now.

    Let us know if you have any other questions.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.