Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

“Serves images with low resolution” warning for woocommerce product pages

  • 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

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.