Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #22684

    How can I disable the edge trimming for product pictures in the overview?

    I would like to display the whole product picture as the thumbnail instead of a cutted square thumbnail which was trimmed.




    Open config-woocommerce > config.php then find this code

    $avia_config['imgSize']['shop_thumbnail'] 	= array('width'=>130, 'height'=>85);
    $avia_config['imgSize']['shop_catalog'] = array('width'=>450, 'height'=>450);
    $avia_config['imgSize']['shop_single'] = array('width'=>450, 'height'=>999, 'crop' => false);

    Replace it with

    $avia_config['imgSize']['shop_thumbnail'] 	= array('width'=>130, 'height'=>85, 'crop' => false);
    $avia_config['imgSize']['shop_catalog'] = array('width'=>450, 'height'=>450, 'crop' => false);
    $avia_config['imgSize']['shop_single'] = array('width'=>450, 'height'=>999, 'crop' => false);

    You need to regenerate the images using the Regenerate Thumbnails plugin.




    Okay, thanks.

    Now they look good but the different “boxes” in the categories for the preview of a specific product have different heights.

    Is it possible to set them all to the same height?

    See for example.



    Hi Peleke,

    You can use this plugin to set your thumbnail sizes similar to what you just did above:

    However, if the starting image size isn’t larger than the size it is supposed to crop to on both edges, it won’t get set to an equal height. At that point you would want to either resize your starting images to be the same size or if that isn’t possible put them on a blank white canvas in an image editor and then save them at the same size.




    Which means it isn’t possible dynamically with some CSS or PHP code for the Replete theme!?


    No, the theme uses the wordpress thumbnail functions for image control so its a limitation of wordpress and its image editor/functions.



Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Disable edge trimming for product pictures’ is closed to new replies.