Hello,
(ETA: I just re-read your question, and it seems that your images are being resized okay, so please just skip to my suggestion re: css at the bottom. I’m leaving the first bits up in case they help any other members.)
If you would like all of the images on your site to display at 640px width (both for landscape and portrait shots), it would probably be best if you resized them before uploading to WordPress. The media controls in WordPress can be a bit clunky at times, and it’s best to do resizing beforehand.
Alternatively, you could (a) go to settings > media and change the size of the ‘large’ image on upload, (b) use a plugin to automatically resize images when they upload (so that the original file is deleted and only the resized images are kept) or (c) add a line of code to your functions.php to do the same thing as a plugin.
I have used the following within my functions.php file in order to accomplish (c) :
// Automatically resize the original image to 'large' dimensions, then delete original
function replace_uploaded_image($image_data) {
// if there is no large image : return
if (!isset($image_data['sizes']['large'])) return $image_data;
// paths to the uploaded image and the large image
$upload_dir = wp_upload_dir();
$uploaded_image_location = $upload_dir['basedir'] . '/' .$image_data['file'];
$large_image_location = $upload_dir['path'] . '/'.$image_data['sizes']['large']['file'];
// delete the uploaded image
unlink($uploaded_image_location);
// rename the large image
rename($large_image_location,$uploaded_image_location);
// update image metadata and return them
$image_data['width'] = $image_data['sizes']['large']['width'];
$image_data['height'] = $image_data['sizes']['large']['height'];
unset($image_data['sizes']['large']);
return $image_data;
}
add_filter('wp_generate_attachment_metadata','replace_uploaded_image');
If none of the above work, then it could be an issue with your css… your images may be coded such that they will stretch to fit a div. In which case, you would need to change your style.css file so that images display at width: 100%; OR max-width: 100%;
I am new to helping out on these forums, so I hope my response has been of some help and hasn’t further confused matters.