-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 in row block shrinks on front end but not in the editor #68057
Comments
The pixel width is not applied correctly on the frontend. Although it is assigned to the element, it appears to be applied relatively, which may be causing the observed behavior. Here’s a video showing the issue: |
I think its related to image block itself, as if you add an image with width 1020px, it should overflow on mobile but it doesn't. Tried with: WP 6.6.2 & 2024 theme |
It seems that in the editor, the width is set to the Screenshot of div with a width value on the editor Perhaps on the front end the Image Width could be applied to the Screenshot where size and flex-shrink values have been added to figure element on front end to prevent the image from shrinking |
@andreawetzel Based on my research into previous issues, adding width and height attributes in figure element appears to have been an intentional change related to captions. It might be worth exploring this further to identify a potential fix using max-width application. Reference: PR #53274 |
I can reproduce, and both removing the |
Description
In a row block, if an image is resized to a specific width and placed next to a multi-lined paragraph, the image appears small on the front end, but is the correct size in the editor. This is confusing for folks learning how to use the row block for layout because the published page is different from what they expect.
Reproduced in the Twenty Twenty Four theme.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
WP 6.7.1
Gutenberg plugin not active
Tested in both Twenty Twenty Four Theme and custom Hybrid theme
Mac, Chrome
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: