Skip to content

Commit

Permalink
Image: Clear aspect ratio when wide aligned (WordPress#53439)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajlende authored Aug 9, 2023
1 parent 38ad72f commit 887f11c
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 887f11c

Please sign in to comment.