Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ export default function Image( {
hasNonContentControls &&
! isWideAligned &&
isLargeViewport;
// An image is uploading if it has a temporary blob URL, or if it is
// being processed client-side (e.g. transcoded or generating sub-sizes).
const isUploading = !! temporaryURL || isSideloading;
const imageSizeOptions = imageSizes
.filter(
( { slug } ) => image?.media_details?.sizes?.[ slug ]?.source_url
Expand Down Expand Up @@ -885,9 +888,7 @@ export default function Image( {
onSelectURL={ onSelectURL }
onError={ onUploadError }
onReset={ () => onSelectImage( undefined ) }
isUploading={
!! temporaryURL || isSideloading
}
isUploading={ isUploading }
emptyLabel={ __( 'Add image' ) }
/>
</ToolsPanelItem>
Expand Down Expand Up @@ -1110,6 +1111,7 @@ export default function Image( {
isResizable &&
isSingleSelected &&
! isEditingImage &&
! isUploading &&
! SIZED_LAYOUTS.includes( parentLayoutType )
) {
const numericRatio = aspectRatio && evalAspectRatio( aspectRatio );
Expand Down
Loading