diff --git a/packages/block-library/src/image/block.json b/packages/block-library/src/image/block.json index fad94a62e5a755..7c8b2c2715c99a 100644 --- a/packages/block-library/src/image/block.json +++ b/packages/block-library/src/image/block.json @@ -64,10 +64,10 @@ "__experimentalRole": "content" }, "width": { - "type": "string" + "type": "number" }, "height": { - "type": "string" + "type": "number" }, "aspectRatio": { "type": "string" diff --git a/packages/block-library/src/image/deprecated.js b/packages/block-library/src/image/deprecated.js index 2f16da1fd8ce9e..bdfdca6ee3c4d6 100644 --- a/packages/block-library/src/image/deprecated.js +++ b/packages/block-library/src/image/deprecated.js @@ -550,86 +550,6 @@ const v5 = { * @see https://github.com/WordPress/gutenberg/pull/31366 */ const v6 = { - attributes: { - align: { - type: 'string', - }, - url: { - type: 'string', - source: 'attribute', - selector: 'img', - attribute: 'src', - __experimentalRole: 'content', - }, - alt: { - type: 'string', - source: 'attribute', - selector: 'img', - attribute: 'alt', - default: '', - __experimentalRole: 'content', - }, - caption: { - type: 'string', - source: 'html', - selector: 'figcaption', - __experimentalRole: 'content', - }, - title: { - type: 'string', - source: 'attribute', - selector: 'img', - attribute: 'title', - __experimentalRole: 'content', - }, - href: { - type: 'string', - source: 'attribute', - selector: 'figure > a', - attribute: 'href', - __experimentalRole: 'content', - }, - rel: { - type: 'string', - source: 'attribute', - selector: 'figure > a', - attribute: 'rel', - }, - linkClass: { - type: 'string', - source: 'attribute', - selector: 'figure > a', - attribute: 'class', - }, - id: { - type: 'number', - __experimentalRole: 'content', - }, - width: { - type: 'number', - }, - height: { - type: 'number', - }, - aspectRatio: { - type: 'string', - }, - scale: { - type: 'string', - }, - sizeSlug: { - type: 'string', - }, - linkDestination: { - type: 'string', - }, - linkTarget: { - type: 'string', - source: 'attribute', - selector: 'figure > a', - attribute: 'target', - }, - }, save( { attributes } ) { const { url, diff --git a/packages/block-library/src/image/save.js b/packages/block-library/src/image/save.js index 81565af09ababf..6fa8c6b2342f32 100644 --- a/packages/block-library/src/image/save.js +++ b/packages/block-library/src/image/save.js @@ -61,6 +61,8 @@ export default function save( { attributes } ) { width, height, } } + width={ width } + height={ height } title={ title } /> );