diff --git a/wp-includes/media.php b/wp-includes/media.php index 2bc8c46a74..66e50428d8 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1929,13 +1929,13 @@ function wp_print_media_templates() { } #{{ data.id }} .portrait .thumbnail img { - width: {{ data.edge }}px; + max-width: {{ data.edge }}px; height: auto; } #{{ data.id }} .landscape .thumbnail img { width: auto; - height: {{ data.edge }}px; + max-height: {{ data.edge }}px; }