Getting the data
In order to be able to manage both portrait and landscape image formats, we need to be able to figure out the dimensions of an image
$image_data = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), “thumbnail” );
 => url
 => width
 => height
 => boolean: true if $url is a resized image, false if it is the original.
Determining the layout