Skip to content

Commit

Permalink
Image: Clear aspect ratio when wide aligned (#53439)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajlende authored and tellthemachines committed Aug 31, 2023
1 parent 340df75 commit 3f0c87a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,12 @@ export default function Image( {

function updateAlignment( nextAlign ) {
const extraUpdatedAttributes = [ 'wide', 'full' ].includes( nextAlign )
? { width: undefined, height: undefined }
? {
width: undefined,
height: undefined,
aspectRatio: undefined,
scale: undefined,
}
: {};
setAttributes( {
...extraUpdatedAttributes,
Expand Down

0 comments on commit 3f0c87a

Please sign in to comment.