From 260a34646b357a5ca91ef721677ff171c6e231e0 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Tue, 7 Mar 2023 04:45:04 +0000 Subject: [PATCH] Media: improve display of cropped image in media editor. Correctly display edits after you crop an image and return to the attachments page. Prefer the `full` over the `large` size image on the edit image screen. Props andy786, antpb, sanketchodavadiya, antonvlasenko, ironprogrammer. Fixes #55070. git-svn-id: https://develop.svn.wordpress.org/trunk@55470 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/media-template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index 10598187d1..7656d253ef 100644 --- a/src/wp-includes/media-template.php +++ b/src/wp-includes/media-template.php @@ -377,10 +377,10 @@ function wp_print_media_templates() {
<# if ( data.uploading ) { #>
- <# } else if ( data.sizes && data.sizes.large ) { #> - <# } else if ( data.sizes && data.sizes.full ) { #> + <# } else if ( data.sizes && data.sizes.large ) { #> + <# } else if ( -1 === jQuery.inArray( data.type, [ 'audio', 'video' ] ) ) { #> <# } #>