Cumulative Layout Shift (CLS)

  • Andr989
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
10 months 1 week ago #51123 by Andr989
Hi,

Do you have any suggestions for improving the Cumulative Layout Shift (CLS) score in PageSpeed Insights? Since I started using this template, it has worsened significantly.

Regards

Please Log in to join the conversation.

  • milos
    Support Staff
  • Moderator
  • Moderator
More
10 months 6 days ago #51125 by milos
Replied by milos on topic Cumulative Layout Shift (CLS)
Hello,

This is not related to the template but to your content. The most common causes of poor CLS are the following:

- Images without dimensions.
- Ads, embeds, and iframes without dimensions.
- Dynamically injected content such as ads, embeds, and iframes without dimensions.
- Web fonts.

More info web.dev/articles/optimize-cls

Regards,
Milos

Please Log in to join the conversation.

  • Andr989
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
9 months 4 weeks ago #51169 by Andr989
Hi,

Thank you for the advice; I'll conduct new tests. Additionally, I'd like to incorporate fetchpriority="high" and rel="preload" for the site logo, but I'm unable to locate the file for modification. Could you please point me to the path?

Thanks,

Please Log in to join the conversation.

  • milos
    Support Staff
  • Moderator
  • Moderator
More
9 months 4 weeks ago #51170 by milos
Replied by milos on topic Cumulative Layout Shift (CLS)
Hello,

You can edit the code that displays the logo image in the file /templates/sparky_framework/library/logo.php. This is the line that displays the logo image:
Code:
<img src="<?php echo $media_path."/images/".$logo_img[0].$logoStyle.".".$logo_img_extension; ?>" <?php if ($retina_image) { ?>srcset="<?php echo $media_path.DIRECTORY_SEPARATOR."images".DIRECTORY_SEPARATOR.$logo_img[0]."-2x.".$logo_img_extension ?> 2x"<?php } ?> alt="<?php echo $logoImageAlt; ?>">

Regards,
Milos

Please Log in to join the conversation.

Time to create page: 0.293 seconds
Powered by Kunena Forum