Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
How to fix the Cumulative Layout Shift (CLS) error website name is : https://edubaicart.com
Thank you
Solved! Go to the solution
This is an accepted solution.
@ae3 ,
Hi ,
I have gone through your store. Your store looks good.
I have checked your site in the page insight chrome tool. your website score is very low.
Cumulative Layout Shift measures the movement of visible elements within the viewport.
Refer this URL.
By fixing these issues, your website speed score can definitely improve.
If anything is missed out or unclear then don't hesitate to ask. Let us know in details.
Have a nice day !
This is an accepted solution.
@ae3 ,
Hi ,
I have gone through your store. Your store looks good.
I have checked your site in the page insight chrome tool. your website score is very low.
Cumulative Layout Shift measures the movement of visible elements within the viewport.
Refer this URL.
By fixing these issues, your website speed score can definitely improve.
If anything is missed out or unclear then don't hesitate to ask. Let us know in details.
Have a nice day !
Thank you
Hey! This is exactly the issue I am having on my site based on Google inspecting traffic. I am not a dev so I am not sure I understand how to fix the problem. I hope you don't mind me asking for clarification: when you say Always include size attributes on your images and video elements do you mean the file name should include the size of he file? And since I am in the process of bulk compressing all my photos, can I fix this in bulk? Is there a Shopify app you reco using for this? One that would help me re-name correctly all the files? Thanks for your help! 🙂
Uh, yeah. More on how and ideally not manually(pic by pic).
gabysbags.com
Always include width and height size attributes on your images and video elements. Alternatively, reserve the required space with CSS aspect ratio boxes. This approach ensures that the browser can allocate the correct amount of space in the document while the image is loading.
<img src="puppy.jpg" width="640" height="360" alt="Puppy with balloons" />
You may notice the width and height above do not include units. These "pixel" dimensions would ensure a 640x360 area would be reserved. The image would stretch to fit this space, regardless of whether the true dimensions matched or not.
When Responsive Web Design was introduced, developers began to omit width and height and started using CSS to resize images instead:
img {
width: 100%; /* or max-width: 100%; */
height: auto;
}
Shopify Image Element Explicit width and height:
<img class="lazyload"
src="data:image/svg+xml;utf8,<svg%20xmlns='http://www.w3.org/2000/svg'%20width='{{ preview_image.width }}'%20height='{{ preview_image.height }}'></svg>"
data-src="{{ image_100x | img_url: '100x' }} 100w"
data-srcset="{{ image_1200x }} 1200w,
{{ image_980x }} 980w,
{{ image_480x }} 480w”
width="{{preview_image.width}}"
height="{{preview_image.height}}"
alt="{{ preview_image.alt }}">
If your store images are calling from different file liquid code then It can be difficult to add hight width. If it is coming in loop or in blog, then it is possible to add. I think there is no app for this...
You can give me the store access I will check your issue. Can you share the store URL.
hello! I think I understand that could be fixed more easily than having to re-name all 1000 files I have right? 🙂
my store is www.decointerni.com
thanks so much for your help!
Hi, I reall y need support with CLS https://lojamanuelcoelho.com/
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024