diff --git a/packages/block-library/src/image/image.js b/packages/block-library/src/image/image.js index a880c20ed59ab..fe8f8e7f6aeb1 100644 --- a/packages/block-library/src/image/image.js +++ b/packages/block-library/src/image/image.js @@ -477,24 +477,26 @@ export default function Image( { /> ) } - { - // Rebuilding the object forces setting `undefined` - // for values that are removed since setAttributes - // doesn't do anything with keys that aren't set. - setAttributes( { - width: newValue.width, - height: newValue.height, - scale: newValue.scale, - aspectRatio: newValue.aspectRatio, - } ); - } } - defaultScale="cover" - defaultAspectRatio="auto" - scaleOptions={ scaleOptions } - unitsOptions={ dimensionsUnitsOptions } - /> + { isResizable && ( + { + // Rebuilding the object forces setting `undefined` + // for values that are removed since setAttributes + // doesn't do anything with keys that aren't set. + setAttributes( { + width: newValue.width, + height: newValue.height, + scale: newValue.scale, + aspectRatio: newValue.aspectRatio, + } ); + } } + defaultScale="cover" + defaultAspectRatio="auto" + scaleOptions={ scaleOptions } + unitsOptions={ dimensionsUnitsOptions } + /> + ) }