Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aligned Image Blocks disappear when attempting to Crop #69295

Closed
4 of 6 tasks
MadtownLems opened this issue Feb 24, 2025 · 3 comments
Closed
4 of 6 tasks

Aligned Image Blocks disappear when attempting to Crop #69295

MadtownLems opened this issue Feb 24, 2025 · 3 comments
Labels
[Block] Image Affects the Image Block [Type] Bug An existing feature does not function as intended

Comments

@MadtownLems
Copy link

Description

When an Image Block is aligned (left, center, right, etc), and a user clicks Crop from the toolbar → the image simply disappears.

Step-by-step reproduction instructions

  1. Insert an Image Block
  2. Align it Center
  3. Click 'Crop' from the Block Toolbar

The image just disappears and cannot be cropped.

Screenshots, screen recording, code snippet

Image

Environment info

WordPress 6.6.1 and 6.7.2, with and without Gutenberg 20.0.3. Also confirmed on WordPress Playground.

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@MadtownLems MadtownLems added the [Type] Bug An existing feature does not function as intended label Feb 24, 2025
@Mamaduka Mamaduka added the [Block] Image Affects the Image Block label Feb 24, 2025
@Mamaduka
Copy link
Member

Thanks, @MadtownLems!

This looks similar to #68668, and @stokesman is working on a fix in #68666.

@stokesman
Copy link
Contributor

I can reproduce this on trunk. #68666 does fix it in my testing. Here’s a demo from that branch:

image-align-center.left.right-v-crop.mp4

I suppose this issue and #68668 could be combined into one.

@Mamaduka
Copy link
Member

Thanks, @stokesman! Closing as duplicate of #68668.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants