Okay
  Public Ticket #1843618
Product gallery thumbnails
Closed

Comments

  •  2
    Yiannis started the conversation

    Hello,

    How can i change the size of Product gallery thumbnails from 100x100 to 68x102 ?

    I already changed product images to 473x710 

    thank you

  •  1,559
    Laborator replied

    Hi there,

    You can do that by installing Simple Image Sizes plugin and set a custom size for the thumbnails and then make sure you regenerate these thumbnails so the changes will be applied.

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  •  2
    Yiannis replied

    Hello, i tried it, but it didn't work

    I also added the following lines to functions.php 

        add_image_size( 'woocommerce_gallery_thumbnail', '68', '102', true );
        add_image_size( 'shop_thumbnail', '68', '102', true );

    but it shows me that the sizes that are currently registered, didnt change:

    Woocommerce gallery thumbnail - 100x100
    Shop thumbnail - 100x100

    Please advice

    Just to make sure, my question was clear.

    For example in single product https://themes.laborator.co/aurum/fashion/product/paul-smith/
    i want the thumbnails on the left to be 68x102 instead of 100x100

    Thank you for your help!

  •  1,559
    Laborator replied

    Hi Yannis,

    Can you please share your site credentials here, because we need to login to your site and see this issue live. Your information is safe (private) in this thread.

    To include your credentials click Insert Credentials button in editor toolbar. (See how)

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  •   Yiannis replied privately
  • [deleted] replied

    Hi Yiannis,

    I have added the following code in functions.php of child theme:

    // WooCommerce Product Image Gallery Thumbnails Size
    function woocommerce_custom_gallery_image_size( $size ) {
    return array( 68, 102 );
    }

    add_filter( 'woocommerce_gallery_image_size', 'woocommerce_custom_gallery_image_size' );

    And it fixed the issue:

    medium
    (view large image)

    I hope you like it.

  •  2
    Yiannis replied

    Thank you Arlind,

    Thumbnail size is fixed, but the main single product image is not a blurred image on low resolution.

    Can you fix this?

    Thank you

  •  2
    Yiannis replied

    check image

  • [deleted] replied

    Hi Yiannis,

    I have modified the piece of code that I have added with this one:

    // WooCommerce Product Image Gallery Thumbnails Size
    function woocommerce_custom_gallery_image_size( $size ) {

    if ( 'woocommerce_gallery_thumbnail' === $size ) {
    return array( 68, 102 );
    }

    return $size;
    }

    add_filter( 'woocommerce_gallery_image_size', 'woocommerce_custom_gallery_image_size' );
    So now it doesn't affect main product image.