From 8a6d1c5b8987392616cbf7125ab14c856456542d Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Mon, 3 Dec 2012 00:42:26 +0000 Subject: [PATCH] Prevent small thumbnails from being upscaled. props helenyhou. fixes #22681. git-svn-id: https://develop.svn.wordpress.org/trunk@22978 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/media.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }