How can I resolve a CLS error on Taste theme slideshow?

Solved

How can I resolve a CLS error on Taste theme slideshow?

Vapes4You
Excursionist
41 3 12

Hi Community,

 

we are using the Taste Shopify Standard Theme. On the index page we use a slideshow to present our products.

Unfortunately this causes a CLS of 0.29 and the core web vitals test is failed.

 

Page is: https://vapes4you.de

 

How can we fix this?

 

2023-11-14 10_46_29-vapes4you.de _ Chro...irginia USA - EC2 - Web Vitals Details.png

2023-11-14 10_46_05-vapes4you.de _ Chro...irginia USA - EC2 - Web Vitals Details.png

 

Kind regards

V4Y

You're personal Vapeshop expert 🙂
Accepted Solution (1)
Vapes4You
Excursionist
41 3 12

This is an accepted solution.

I have found the solution, if someones interested here it is:

 

I have checked the ideal size for the slideshow. As it turns out it differs depending on the theme settings as you can see in this article I found online: https://webpop.io/shopify/image-sizes/

 

Vapes4You_0-1700053028828.png

 

So I resized all of the images to 1200x475px (As my slideshow settings are set to small) and the CLS has disappeared. As a little bonus the image are now smaller in size.

 

Kind regards

 

You're personal Vapeshop expert 🙂

View solution in original post

Replies 3 (3)

BSS-Commerce
Shopify Partner
3478 465 560

Hi @Vapes4You ,

In your case, I think it's because the size of the images in your slide show is not specifically defined in terms of size (length and width). This causes the browser to not know the size of the image in advance, so it needs to resize the page when loading the image.

To fix this, you should specify the size (width and height) of the image in your slide show using html or css.
Additionally, you can learn more here for more ways to optimize cls: https://web.dev/articles/optimize-cls

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


Product Labels by BSS | B2B Solution & Custom Pricing


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
Vapes4You
Excursionist
41 3 12

Hi @BSS-Commerce ,

 

thank you very much for your answer, I think you are correct.

Unfortunately the css behind this slideshow is so complicated, that it is impossible for me to edit. I think this should be done by Shopify Dev.

 

Kind regards

You're personal Vapeshop expert 🙂
Vapes4You
Excursionist
41 3 12

This is an accepted solution.

I have found the solution, if someones interested here it is:

 

I have checked the ideal size for the slideshow. As it turns out it differs depending on the theme settings as you can see in this article I found online: https://webpop.io/shopify/image-sizes/

 

Vapes4You_0-1700053028828.png

 

So I resized all of the images to 1200x475px (As my slideshow settings are set to small) and the CLS has disappeared. As a little bonus the image are now smaller in size.

 

Kind regards

 

You're personal Vapeshop expert 🙂