In this case I would add image size in functions.php which registers new image size in my theme and get the re-sized image.
Example:
Register custom image size (functions.php)
if ( function_exists( 'add_image_size' ) ) {
add_image_size( 'custom-image', 440, 265, true ); //(cropped)
}
Get custom image size (functions.php)
function get_custom_image(){
global $post, $posts;
$args = array(
'post_type' => 'attachment',
'numberposts' => 1,
'post_status' => null,
'post_parent' => $post->ID
);
$attachments = get_posts( $args );
if ( $attachments ) {
foreach ( $attachments as $attachment ) {
$found = wp_get_attachment_image( $attachment->ID, 'custom-image' );
preg_match( '@src="https://wordpress.stackexchange.com/questions/99987/([^"]+)"@' , $found , $match );
$img = $match[1];
return $img;
}
}else{
echo 'image_not_available_path_.jpg';
}
}
Using inside loop
<div class="post-image">
<img src="https://wordpress.stackexchange.com/questions/99987/<?PHP get_custom_image(); ?>" alt="cait barker post image" />
</div><!-- end blog-image -->
Code not fully tested, you have to modify it a bit for your needs.