Support » Plugin: Additional Variation Images Gallery for WooCommerce » Adjust thumbnail cropping?

  • Hi,

    I have 2 additional variation images for a product. The images show up correctly when I select the thumbnail (total of 3 thumbnails – 1 original and 2 additional).

    However, the cropping is off in the thumbnails so it’s hard to see what the image actually is.

    Is there a way to adjust the thumbnail cropping? I would like the entire image to show up even if it’s small as the variation image is full size.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor GetWooPlugins



    Could you try the following code and add it in the child-theme/functions.php

    add_filter( ‘woocommerce_get_image_size_gallery_thumbnail’, function( $size ) {
    return array(
    ‘width’ => 150,
    ‘height’ => 150,
    ‘crop’ => 0,
    } );

    Thank You




    Thanks for your suggestion. Unfortunately, adding this to my functions.php didn’t seem to make a difference. I even regenerated the thumbnails and that didn’t seem to help.

    One odd thing I’ve noticed is that if I use a square product variation image regardless of size (eg, 800px x 800px), the thumbnail image is scaled down perfectly (small image but entire image can be seen).

    However, if I upload a rectangular variation image that is a really small size (eg, 100px x 50 px), the corresponding thumbnail image looks zoomed in, even more than when I upload the large square image.

    It seems that the cropping of the thumbnail is affected by the aspect ration of the variation image. So basically, a very small resolution rectangular will have more cropping than a very high resolution square image (which have no cropping).

    To test, I’ve tried several variation swatch plugins and their behavior is the same. I contacted all the plugin authors and they all say basically the same thing… that they are just using WooCommerce to call the image and not doing any cropping.

    Hopefully this make sense.

    Any other suggestions? I don’t want to have to transform all my photos into square imageS just to prevent cropping.


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