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

Image: Revert "Prevent the image from being resized larger than its container" #47846

Merged
merged 1 commit into from
Feb 8, 2023
Merged

Image: Revert "Prevent the image from being resized larger than its container" #47846

merged 1 commit into from
Feb 8, 2023

Conversation

d-alleyne
Copy link
Contributor

This reverts commit 2e8c7e4.

What?

The PR #45775 aimed to prevent an image from being resized larger than its container. This commit reverts that change.

Why?

The previous PR prevented an inserted image to be larger than its container. However, it created a new issue #47539, where images are displayed smaller on browser reload when working in the editor.

How?

Revert #45775

Testing Instructions

  1. Start from any WP site with only Gutenberg 15.0 or higher active
  2. Add an image block to a post (or page, or other custom post type I guess, but I only tried with posts/pages)
  3. Center, left-align, or right-align, and ensure there's a caption visible
  4. Save or publish
  5. Exit editor
  6. Re-enter editor to edit your post
  7. See image remains the same size.
  8. Reload the page and verify that the image remains the same size.

Testing Instructions for Keyboard

Screenshots or screencast

@d-alleyne d-alleyne requested a review from ajitbohra as a code owner February 7, 2023 18:36
Copy link
Member

@kevin940726 kevin940726 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kevin940726 kevin940726 merged commit 8342d99 into WordPress:trunk Feb 8, 2023
@github-actions github-actions bot added this to the Gutenberg 15.2 milestone Feb 8, 2023
@d-alleyne d-alleyne deleted the revert/image-block-can-be-resized-larger-than-viewport branch February 8, 2023 13:57
@ndiego ndiego added the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Feb 9, 2023
ntsekouras pushed a commit that referenced this pull request Feb 13, 2023
@ntsekouras
Copy link
Contributor

I just cherry-picked this PR to the wp/6.2 branch to get it included in the next release: 2938ad9

@ntsekouras ntsekouras removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Feb 13, 2023
@DaisyOlsen DaisyOlsen added [Package] Block library /packages/block-library [Block] Image Affects the Image Block [Type] Bug An existing feature does not function as intended labels Feb 14, 2023
@DaisyOlsen DaisyOlsen changed the title Revert "Prevent the image from being resized larger than its container" Image: Revert "Prevent the image from being resized larger than its container" Feb 14, 2023
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 [Package] Block library /packages/block-library [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

5 participants