Home Forums Exoplanet Image resizing: fit to grid without hard crop (Exo / Woo)

This topic contains 4 replies, has 2 voices, and was last updated by  Andy 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #1783



    with this theme I can’t find the way to “fit” the images instead of cropping them.

    Both in the catalogue image (grid) and in single product image. There is a way to handle this customization?

    Best regards




    In the ‘Product images’ settings WooCommerce > Settings > Products > Display what are your current settings for these options?

    • Catalog images
    • Single product images


    Hello Andy,

    I tried all the settings. with and without hard crop, and also leaving blank alternatively width and height with and without hard crop.

    Of course I regenerate the thumbnails at every change of settings. After one hour of trying I asked for help in this forum :-).

    I am not so expert in coding to understand if this behavior is produced from Woo core or from the template. I begin to think is an issue depending from woo, which does not gives any possibilities to fit the image to the desired dimension, but only gives the option to crop.

    So if you have an img 200 x 500 and another one 500 x 200 you never have the possibility to get them in a 200×200 place, proportionally resized without crop.

    Best Regards




    Are you using a child theme?



    You could try to force your own image sizes in a child theme.

    To do this you would need to grab our Exoplanet Child Theme.

    Install and activate the child theme, and then go to ‘Appearance’ > ‘Editor’ select the Exoplanet Child theme and add this code to the functions.php file and save by clicking ‘Update File’:

    function exoplanet_setup() {
    	add_image_size('exoplanet-shop-single', 500, 500, false );
    	add_image_size('exoplanet-shop-archive', 200, 200, false );
    add_action( 'after_setup_theme', 'exoplanet_setup', 20 );

    Change the sizes to whatever you need e.g. 500, 500, is 500 x 500 and false tells WP not to crop the images.

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

You must be logged in to reply to this topic.