I am trying to tet an explicit width and height on image elements to reduce layout shifts and improve CLS across all my product images. What section of code do I find the images for all my products?
Topic summary
A user is seeking to add explicit width and height attributes to product images across their Shopify store to reduce Cumulative Layout Shift (CLS) and improve performance metrics. They need guidance on which section of code controls these product images.
GemPages support team responded with initial troubleshooting steps:
- Recommended opening the product-template.liquid file
- Suggested looking for featured-media-product section
The conversation appears incomplete, as the support response seems truncated or contains formatting issues. The discussion remains open with the user awaiting complete implementation instructions for adding image dimensions to their product templates.
Hello @Blazinsunn ,
It’s GemPages support team and glad to support you today.
You could please try opening product-template.liquid file and find product-featured-media:
Best regards,
GemPages Support Team
