Site logo

Archived topic

Improve site speed

5 replies · Started by Laurentiu on March 15, 2021

Viewing posts 1–6 of 6

I have a website I just rebuilt using GeneratePress and I can't get it's speed to a higher value.
The website is this one and here is the pagespeed insights analysis.
If I activate lazy loading for css files it starts detecting CLS.
Do you have any ideas about what I can do to increase these ratings?

Hi there,

Let's break things down.

For the Image elements do not have explicit width and height:

Some GP sites have 2 logo versions, one for mobile and one for desktop.

For mobile(Mobile Header EnableD), you can add the image height and width by filtering it using the generate_mobile_header_logo_output filter.

See David’s code here:
https://generatepress.com/forums/topic/how-to-set-height-and-width-for-the-logo-image/#post-1563234

For the desktop version of the logo, you can add in the height and width attribute by using my snippet here:
https://generatepress.com/forums/topic/los-elementos-de-imagen-no-tienen-width-y-height-explicitos/#post-1679528

For the Ensure text remains visible during webfont load:

You can try preloading the font by adding this code to a hook element hooked to wp_head with set display rule to entire site:

<link rel="preload" as="font" type="font/woff2" crossorigin href="https://use.fontawesome.com/releases/v5.15.1/webfonts/fa-solid-900.woff2"/>

For the Avoid an excessive DOM size:
Perhaps David's tip works for you:
https://generatepress.com/forums/topic/avoid-an-excessive-dom-size-inline-svg-or-svg-file-tag/#post-1526403

For the Serve images in next-gen formats:
Convert your photos to recommended formats and reupload them. Or try using Optimole or Smush to do improvements for you. :)

For Remove unused CSS:
You seem to have an unused plugin named "GetWid", try removing it if that's really the case.

For Reduce initial server response time:
This is server-related and something you should raise with your hosting provider.

For Eliminate render-blocking resources:
See Tom's recommendation:
https://generatepress.com/forums/topic/eliminate-render-blocking-resources-2/#post-1527484

Thank you very much Elvin!

Wow! Gtmetrix gives me:

100% Structure
98% Web Vitals
Largest Contentful Paint 411ms
Total Blocking Time 0ms
Cumulative Layout Shift 0

This is one of the fastest sites I've ever seen. And you want to improve it? That's the spirit, man! Good work!

Thank you mkjj. I will leave it like this for now.

No problem. :)

This archived topic is closed to new replies.