From 9284be96a68f00fe7861804c2b68f8bdc8580a76 Mon Sep 17 00:00:00 2001 From: Amit Raj Date: Fri, 28 Jun 2024 11:13:22 +0530 Subject: [PATCH] Addressed feedback --- packages/block-library/src/image/image.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/image/image.js b/packages/block-library/src/image/image.js index 5a61f5490483c0..17a860fa5f47ce 100644 --- a/packages/block-library/src/image/image.js +++ b/packages/block-library/src/image/image.js @@ -408,7 +408,10 @@ export default function Image( { { - setAttributes( { aspectRatio: newAspectRatio } ); + setAttributes( { + aspectRatio: newAspectRatio, + scale: 'cover', + } ); } } defaultAspectRatio="auto" tools={ [ 'aspectRatio' ] } @@ -864,7 +867,7 @@ export default function Image( { /> ); - } else if ( ! isResizable ) { + } else if ( ! isResizable || parentLayoutType === 'grid' ) { img = (
{ img }