There are multiple solutions:
-
Use CSS for post images:
.post img { height: 300px; width: auto; }
-
Use a custom thumbnail size. Either in Settings -> Media or use a third-party plugin to generate them. Another way would be to code your own:
function custom_image_sizes() {
add_theme_support('post-thumbnails');
add_image_size('breaking-news', 9999, 300, true);
}
function add_custom_sizes( $imageSizes ) {
$my_sizes = array(
'breaking-news' => 'My breaking news image'
);
return array_merge( $imageSizes, $my_sizes );
}
add_action('after_setup_theme', 'custom_image_sizes');
add_filter( 'image_size_names_choose', 'add_custom_sizes' );