-
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 block not resizing correctly #37374
Comments
@glendaviesnz - Are you able to re-test with one minor tweak? I am experiencing the same negative width/height when an aligned image is resized SMALLER. (It actually doesn't matter if it's from URL or media library). But a key part of the problem is that the FIRST drag-to-resize needs to be smaller, not larger. When I align an image, then drag it smaller, I get negative a negative width and height. |
I have confirmed this bug still exists on 5.9 (no Gutenberg plugin). Simply: |
Here are my results. WP 5.9 without Gutenberg. CleanShot.2022-02-03.at.20.30.50.mp4 |
And here's my screencast. ( also WP 5.9 without gutenberg 🤔) negative-widths.mp4 |
Thanks for the extra detail @MadtownLems, I was able to replicate this on GB trunk if I make the image smaller first. Interesting that it is fine for you @Mamaduka, I wonder if it is something to do with the original dimensions/aspect ratio of the image as well? I will try and take a closer look at it today. |
I haven't had any luck tracking this down yet. For some reason, the |
Thanks for the confirmations, @glendaviesnz. I think narrowing down the "requirements" to constantly reproduce the issue will be very helpful for tracking this down |
Yeh, it mostly did it for me, but sometimes didn't, and wasn't able to isolate what was the difference. I will take another look at it next week if someone else doesn't get to it. |
FWIW, I am no longer experiencing this particular image block sizing problem on 6.2 |
I am experiencing this issue on 6.2 Using an SVG, editing the header of a site using the theme |
Description
I noticed the image block breaks when you attempt to resize it if
Insert from URL
feature was used and the image is using left, right or center align.The image appears fine in the editor but you'll notice negative values for
width
andheight
in the sidebar - once you reload the editor or go into the preview the image will be sized differently.Step-by-step reproduction instructions
core/image
).Insert from URL
option in the image placeholder to insert an image from a URL.Align Left
,Align Right
orAlign Center
from the alignment options in the toolbar.width
andheight
settings in the sidebar while you're resizing it.Note: I noticed that if I start resizing an image as soon as I add it and then change block alignment, the bug no longer occurs.
Screenshots, screen recording, code snippet
Environment info
I've noticed this issue on WordPress 5.9-beta2-52363 as well as Gutenberg 12.1.0.
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
The text was updated successfully, but these errors were encountered: