Home › Forums › Exoplanet › Image resizing: fit to grid without hard crop (Exo / Woo) › Reply To: Image resizing: fit to grid without hard crop (Exo / Woo)
August 22, 2017 at 6:07 pm
#1799
Andy
Keymaster
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.