diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index 3c20ef7a5d..71bfc2809e 100644 --- a/src/wp-includes/media-template.php +++ b/src/wp-includes/media-template.php @@ -276,7 +276,7 @@ function wp_print_media_templates() {
<# if ( data.uploading ) { #>
- <# } else if ( 'image' === data.type ) { #> + <# } else if ( 'image' === data.type && data.sizes && data.sizes.full ) { #> <# } else if ( -1 === jQuery.inArray( data.type, [ 'audio', 'video' ] ) ) { #> @@ -310,7 +310,7 @@ function wp_print_media_templates() { <# } #>
- <# if ( 'image' === data.type && ! data.uploading ) { #> + <# if ( 'image' === data.type && ! data.uploading && data.sizes ) { #> <# } #>
@@ -425,7 +425,7 @@ function wp_print_media_templates() {
<# if ( data.uploading ) { #>
- <# } else if ( 'image' === data.type ) { #> + <# } else if ( 'image' === data.type && data.sizes ) { #>
@@ -481,7 +481,7 @@ function wp_print_media_templates() {
<# if ( data.uploading ) { #>
- <# } else if ( 'image' === data.type ) { #> + <# } else if ( 'image' === data.type && data.sizes ) { #> <# } else { #>