Search code examples
pagespeed-insights

font-display not being recognised by Pagespeed


Getting red flagged for:

Ensure text remains visible during webfont load Leverage the font-display CSS feature to ensure text is user-visible while webfonts are loading

I have font-display: auto in my font declarations:

@font-face {
  font-family: 'lagosregular';
  src: url('../fonts/lagos-webfont.woff2') format('woff2'),
  url('../fonts/lagos-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: auto;
}

https://africankitchen.gallery


Solution

  • I'm testing your site on PSI but not getting the Ensure text remains visible during webfont load. Did it resolve itself? If you took some extra steps or different path to make it happen, consider answering your own question for others who find this.