Make WordPress Core

Changeset 55470


Ignore:
Timestamp:
03/07/2023 04:45:04 AM (19 months ago)
Author:
adamsilverstein
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r55276 r55470  
    378378                <# if ( data.uploading ) { #>
    379379                    <div class="media-progress-bar"><div></div></div>
     380                <# } else if ( data.sizes && data.sizes.full ) { #>
     381                    <img class="details-image" src="{{ data.sizes.full.url }}" draggable="false" alt="" />
    380382                <# } else if ( data.sizes && data.sizes.large ) { #>
    381383                    <img class="details-image" src="{{ data.sizes.large.url }}" draggable="false" alt="" />
    382                 <# } else if ( data.sizes && data.sizes.full ) { #>
    383                     <img class="details-image" src="{{ data.sizes.full.url }}" draggable="false" alt="" />
    384384                <# } else if ( -1 === jQuery.inArray( data.type, [ 'audio', 'video' ] ) ) { #>
    385385                    <img class="details-image icon" src="{{ data.icon }}" draggable="false" alt="" />
Note: See TracChangeset for help on using the changeset viewer.