Skip to content

Commit

Permalink
Copy the linkDestination, href, linkTarget and sizeSlug to new images…
Browse files Browse the repository at this point in the history
… when transforming from Gallery to Image blocks (#38642)

Co-authored-by: Glen Davies <glen.davies@a8c.com>
  • Loading branch information
2 people authored and Mamaduka committed Feb 16, 2022
1 parent 64e6024 commit 51a9cb7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/block-library/src/gallery/transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,10 @@ const transforms = {
url,
alt,
caption,
imageSizeSlug,
sizeSlug: imageSizeSlug,
linkDestination,
href,
linkTarget,
},
} ) =>
createBlock( 'core/image', {
Expand All @@ -301,6 +304,9 @@ const transforms = {
caption,
sizeSlug: imageSizeSlug,
align,
linkDestination,
href,
linkTarget,
} )
);
}
Expand Down

0 comments on commit 51a9cb7

Please sign in to comment.