diff --git a/packages/block-library/src/image/image-size.js b/packages/block-library/src/image/image-size.js
deleted file mode 100644
index d0739fcdd3f2f..0000000000000
--- a/packages/block-library/src/image/image-size.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * WordPress dependencies
- */
-import { useState, useEffect } from '@wordpress/element';
-
-/**
- * Internal dependencies
- */
-import { calculatePreferedImageSize } from './utils';
-
-export default function useImageSize( ref, src, dependencies ) {
- const [ state, setState ] = useState( {
- imageWidth: null,
- imageHeight: null,
- imageWidthWithinContainer: null,
- imageHeightWithinContainer: null,
- } );
-
- useEffect( () => {
- if ( ! src ) {
- return;
- }
-
- const { defaultView } = ref.current.ownerDocument;
- const image = new defaultView.Image();
-
- function calculateSize() {
- const { width, height } = calculatePreferedImageSize(
- image,
- ref.current
- );
-
- setState( {
- imageWidth: image.width,
- imageHeight: image.height,
- imageWidthWithinContainer: width,
- imageHeightWithinContainer: height,
- } );
- }
-
- defaultView.addEventListener( 'resize', calculateSize );
- image.addEventListener( 'load', calculateSize );
- image.src = src;
-
- return () => {
- defaultView.removeEventListener( 'resize', calculateSize );
- image.removeEventListener( 'load', calculateSize );
- };
- }, [ src, ...dependencies ] );
-
- return state;
-}
diff --git a/packages/block-library/src/image/image.js b/packages/block-library/src/image/image.js
index 1681762027483..7445e09d3199f 100644
--- a/packages/block-library/src/image/image.js
+++ b/packages/block-library/src/image/image.js
@@ -35,7 +35,7 @@ import { createBlock } from '@wordpress/blocks';
* Internal dependencies
*/
import { createUpgradedEmbedBlock } from '../embed/util';
-import useImageSize from './image-size';
+import useClientWidth from './use-client-width';
/**
* Module constants
@@ -87,12 +87,8 @@ export default function Image( {
const isLargeViewport = useViewportMatch( 'medium' );
const [ captionFocused, setCaptionFocused ] = useState( false );
const isWideAligned = includes( [ 'wide', 'full' ], align );
- const {
- imageWidthWithinContainer,
- imageHeightWithinContainer,
- imageWidth,
- imageHeight,
- } = useImageSize( containerRef, url, [ align ] );
+ const [ { naturalWidth, naturalHeight }, setNaturalSize ] = useState( {} );
+ const clientWidth = useClientWidth( containerRef, [ align ] );
const isResizable = ! isWideAligned && isLargeViewport;
const imageSizeOptions = map(
filter( imageSizes, ( { slug } ) =>
@@ -213,8 +209,8 @@ export default function Image( {
height={ height }
imageSizeOptions={ imageSizeOptions }
isResizable={ isResizable }
- imageWidth={ imageWidth }
- imageHeight={ imageHeight }
+ imageWidth={ naturalWidth }
+ imageHeight={ naturalHeight }
/>
@@ -266,22 +262,43 @@ export default function Image( {
alt={ defaultedAlt }
onClick={ onImageClick }
onError={ () => onImageError() }
+ onLoad={ ( event ) => {
+ setNaturalSize(
+ pick( event.target, [
+ 'naturalWidth',
+ 'naturalHeight',
+ ] )
+ );
+ } }
/>
{ isBlobURL( url ) &&