From 38496843ac63e7d9af857361eddcac3ea7fa2a12 Mon Sep 17 00:00:00 2001 From: Tetsuaki Hamano Date: Tue, 1 Aug 2023 00:21:33 +0900 Subject: [PATCH] Image block: fix image size at wide and full width --- packages/block-library/src/image/image.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/image/image.js b/packages/block-library/src/image/image.js index fd410fe3cbe5f2..5fe5c93f4199b4 100644 --- a/packages/block-library/src/image/image.js +++ b/packages/block-library/src/image/image.js @@ -566,9 +566,9 @@ export default function Image( { className={ borderProps.className } style={ { width: - ( width && height ) || aspectRatio ? '100%' : 'inherit', + ( width && height ) || aspectRatio ? '100%' : undefined, height: - ( width && height ) || aspectRatio ? '100%' : 'inherit', + ( width && height ) || aspectRatio ? '100%' : undefined, objectFit: scale, ...borderProps.style, } }