• Resolved mas88

    (@mas88)


    Hi,

    How do I change the product thumbnail to show the original image (resized but same aspect ratio) with no cropping. Right now it crops and shows part of my product.

    Thank you.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,
    check out Design – Customizer – WooCommerce

    • This reply was modified 6 years, 2 months ago by tnoe.
    Thread Starter mas88

    (@mas88)

    Hi, I cant find this (Design – Customizer – WooCommerce), if I go to Appearance – Customize there’s no WooCommerce at all. I cant seem to attach images here to show you.

    Any ideas?

    Hi

    Try adding this snippet to your active theme’s/child theme’s functions.php file:

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

    Notice: 150 is size (in pixel) you need

    Good luck

    Plugin Support Kel C. a11n

    (@kellymetal)

    Hi there,

    We haven’t heard back from you in a while, so I’m going to mark this thread as resolved — hopefully @yazdaniwp’s snippet did the trick for you! There’s additional info about working with image sizes in custom themes here:
    https://docs.woocommerce.com/document/image-sizes-theme-developers/

    If you have any further questions, please start a new thread.

    Have a wonderful day!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Shop Thumbnail Size’ is closed to new replies.