Skip to content

gallery block spacing changes the size of images and ignores the column setting #39778

@carolinan

Description

@carolinan

Description

With Gutenberg trunk, if you add a value to the block spacing setting in the gallery block, the size of the images change.
Instead of fitting the images inside the columns set in the gallery, the image size is drastically changed and the images are displayed one by one, vertically. The effect is the same no matter the number of columns that are set, or the image size.

Step-by-step reproduction instructions

Test with a theme with support for blockGap.

  1. Open the block editor
  2. Add a gallery block with images
  3. try to use the block spacing setting

Screenshots, screen recording, code snippet

gallery.mp4

Environment info

WordPress 5.9.2
Gutenberg trunk ( at 41325b9)
Chrome, Windows 10, multiple block themes

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

Labels

[Block] GalleryAffects the Gallery Block - used to display groups of images[Type] BugAn existing feature does not function as intended[Type] FeedbackIssues that relate purely to feedback on a feature that isn't necessarily actionable

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions