--- a/media_gallery.css
+++ b/media_gallery.css
@@ -509,6 +509,11 @@ a.media-gallery-thumb img,
   padding-right: 1em;
 }
 
+.media-gallery-detail-wrapper .media-thumbnail-frame img {
+  width: auto;
+  max-width: 100%;
+}
+
 /* @end */
 
 /* @group Lightbox styles */
