Google fonts keep loading from API despite being set locally
-
Hi. I’m having a problem with local Google fonts. I uploaded the Lato, Karla and Lora fonts locally and put them in the custom fonts section. When I scan a page in Google Page Speed Insights, I can see that the theme is still loading Lora / Karla / Roboto fonts from the Google API, which affects the page loading speed.
How can I get rid of it?
-
This topic was modified 3 years ago by
Jacek.
Attachments:
You must be
logged in to view attached files.
Hello,
The thing is that you need to add for the font’s name some prefix (e.g -local
).
https://gyazo.com/7a3962bea54c1ef08944aaf70a9b2b5c
The names should not be the same as API Google fonts have therefore a prefix fixes this issue.
Feel free to reach out to me anytime when you have anything more to say.
Kind Regards