diff --git a/core-blocks/gallery/index.js b/core-blocks/gallery/index.js
index e02377a8ff3459..5b046ee653204a 100644
--- a/core-blocks/gallery/index.js
+++ b/core-blocks/gallery/index.js
@@ -175,7 +175,7 @@ export const settings = {
break;
}
- const img = ;
+ const img = ;
return (
@@ -193,6 +193,41 @@ export const settings = {
},
deprecated: [
+ {
+ attributes: blockAttributes,
+ save( { attributes } ) {
+ const { images, columns = defaultColumnsNumber( attributes ), imageCrop, linkTo } = attributes;
+ return (
+
+ { images.map( ( image ) => {
+ let href;
+
+ switch ( linkTo ) {
+ case 'media':
+ href = image.url;
+ break;
+ case 'attachment':
+ href = image.link;
+ break;
+ }
+
+ const img = ;
+
+ return (
+ -
+
+
+ );
+ } ) }
+
+ );
+ },
+ },
{
attributes: {
...blockAttributes,
diff --git a/test/integration/fixtures/wordpress-out.html b/test/integration/fixtures/wordpress-out.html
index ffb360c11cae2f..b1d5977395c22f 100644
--- a/test/integration/fixtures/wordpress-out.html
+++ b/test/integration/fixtures/wordpress-out.html
@@ -19,5 +19,5 @@ Shortcode
-
+