diff --git a/src/wp-includes/js/mce-view.js b/src/wp-includes/js/mce-view.js index 0881680b77..7d5f051574 100644 --- a/src/wp-includes/js/mce-view.js +++ b/src/wp-includes/js/mce-view.js @@ -268,14 +268,25 @@ window.wp = window.wp || {}; getHtml: function() { var attrs = this.shortcode.attrs.named, - options; + options, + attachments; if ( ! this.attachments.length ) { return; } + attachments = this.attachments.toJSON(); + + _.each( attachments, function( attachment ) { + if ( attachment.sizes.thumbnail ) { + attachment.thumbnail = attachment.sizes.thumbnail; + } else { + attachment.thumbnail = attachment.sizes.full; + } + } ); + options = { - attachments: this.attachments.toJSON(), + attachments: attachments, columns: attrs.columns ? parseInt( attrs.columns, 10 ) : 3 }; diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index 345935a91e..946e506a88 100644 --- a/src/wp-includes/media-template.php +++ b/src/wp-includes/media-template.php @@ -897,12 +897,6 @@ function wp_print_media_templates() { - -