Archived topic
how to lighten the site?
1 reply · Started by francesco on December 10, 2021
I wanted to know if there is a way to discover unnecessary pieces of code that may possibly burden the site.
Hi there,
not really.
Making the site lighter comes with many challenges.
Some general pointers i focus on are:
1. Image sizes - try to keep them as small as possible. If images are over the 100kb then they could probably do with compressing. Ideally a blog post featured image should be below the 100kb. I aim for 50kb or less.
2. Fonts.
Minimize the number of variants you use.
And if possible load them locally to save on additional DNS lookups and network requests to google servers:
https://docs.generatepress.com/article/adding-local-fonts/
3. 3rd Party scripts such as Adverts - you should use a plugin like Flying Scripts or PerfMatters to defer their loading.