Default image sizes can be defined in WordPress under Media settings, but many theme developers add theme-specific image sizes instead of using the WordPress defaults. These custom sizes can usually be found in the functions.php file. In the Explore theme by ThemeGrill, the medium blog image is 270 x 270 pixels and the featured image is 750 x 310 pixels as seen here:

// Cropping the images to different sizes to be used in the theme
add_image_size( 'explore-featured-blog-medium', 270, 270, true );
add_image_size( 'explore-featured', 750, 310, true );

The way this function is written forces the featured image to be cropped. There’s nothing wrong with this technically, but the result was less than undesirable for my purposes as seen in these screenshots.



To correct this, I located and copied the original code in the parent theme’s functions.php file. Then I simply redefined the image sizes by adding this code to my child theme’s functions.php file.

 function explore_child_theme_setup() { 
add_image_size( 'explore-featured-blog-medium', 270, 9999 ); 
add_image_size( 'explore-featured', 750, 9999 ); } 
add_action( 'after_setup_theme', 'explore_child_theme_setup', 11 ); 

The only change I made was to the height. Adjusting the height to 9999 allows the image to be resized to the correct width without cropping the height of the image.

NOTE: Changing image sizes will only affect uploads after this code is added. Previously uploaded images will need to be regenerated. Several plugins are available for this purpose.

Helpful Links:

Forced Crop Featured Image