-
Hi there,
Pagespeed tool gives me this warning for product pages.
Specifically gallery images of products.https://i.imgur.com/htAdVpX.png
Serves images with low resolution
Image natural dimensions should be proportional to the display size and the pixel ratio to maximize image clarity. Learn how to provide responsive images.Displayed size : 95×95
Actual size : 100×100
Expected size : 143×143 -
Hi there,
Woo sets the size of the image.
But they provide a hook to adjust the size, this is the PHP Snippet to do that:add_filter( 'woocommerce_get_image_size_gallery_thumbnail', function( $size ) { return array( 'width' => 150, 'height' => 150, 'crop' => 0, ); } );
You will need to run the Regenerate Thumbnails plugin afterwards to regenrate the images.
-
Thanks David.
I already have 150×150 images.
Do you think I still need to renegenerate thumbnails?Also, do I need to change anything in template to show these images bigger or keep as is?
-
If you already have the 150×150 image then, no you shouldn’t need to regenerate thumbnails.
And there is no need to change anything in the template. You may need to clear any page caching -
Thanks a lot
-
You’re welcome
- You must be logged in to reply to this topic.