
Peakspire Font Loading Optimizer
v1.2.0PeakSpire · 2026年11月8日 上架
Preloads self-hosted WOFF2 fonts from enqueued stylesheets, adds font-display swap, and optionally removes Google Fonts and guest dashicons.
- 正在使用
- 10 以下
- 评分
- 暂无
- 累计下载
- 444
- 最近更新
- 2026年11月15日
贡献者
截图



Font loading is one of the largest contributors to Largest Contentful Paint (LCP) on real websites. Peakspire Font Loading Optimizer applies the three highest-impact font fixes, built from hands-on Core Web Vitals engineering on production sites:
-
Preload local WOFF2 fonts – Scans your enqueued stylesheets for locally hosted WOFF2 files and adds
<link rel="preload">tags, capped at 4 fonts. Preloaded fonts arrive before the browser discovers them inside CSS files, removing the font round-trip from the critical path. -
Adds
font-display: swapto eligible inline@font-facerules – Rules that already declare an explicitoptional,block,fallback, orautovalue are never touched. Rules without a descriptor getswap, so text renders immediately with the fallback font instead of sitting invisible while web fonts download. -
Remove external Google Fonts (optional) – Dequeues all fonts.googleapis.com requests for sites that have self-hosted their fonts.
-
Remove dashicons for visitors (optional) – Dequeues the dashicons stylesheet for logged-out visitors, saving a render-blocking request most themes never use on the front end.
Everything is front-end only and safe to use alongside caching plugins (WP Rocket, LiteSpeed Cache, W3 Total Cache, etc.).
Why only local fonts are preloaded
Cross-origin font preloads waste bandwidth when the crossorigin fetch does not match the stylesheet fetch. This plugin deliberately preloads only same-host WOFF2 files, the safe default for virtually all themes that self-host fonts.