I'm looking for a way to check if an image has properly created a custom thumbnail size that has been hard cropped.
add_image_size( 'homepage-thumb', 1676, 828, true );
$size = "homepage-thumb";
echo wp_get_attachment_image( $attachment_id, $size );
This works well if the uploaded image is large enough but if it's smaller than the dimensions defined in add_image_size the aspect will be out which invariably breaks a layout. Is there a way to check the thumbnail before echoing the image?