-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 Dimension controls on the Image Block don't work #11530
Comments
Thank you for testing! Want to add a quick note first to say I am helping to separate out issues for the plugin here in this repository and move anything that's happening in WP-5.0-beta-only to https://core.trac.wordpress.org/ I tested with WordPress 4.9.8 and Gutenberg 4.2.0 and found that changing the image dimensions works as expected for me. (49s) I also tested with WordPress 5.0-beta3-43876 and found similar results. (1m13s) I think this is actually a misunderstanding about the UI which could actually be pretty common. It looks to me like image dimensions are relative the original image size but that you were expecting the percentages to be relative to the editor |
Ahhh ok. Yeah, you're right. That makes sense now that you've explained it like that. Thanks. Yep, as you said, what I was expecting is that the image size changed relative to what you see in the editor. And again, I think you're right in saying that this is going to confuse a lot of people. I'm wondering if that wouldn't be a better experience. If we could specify the content_width (along with wide & fill widths), and the editor actually adjusted according to those specified widths, then maybe the 25%/50%/75%/100% buttons should actually be relative to that content_width. Alternatively, if it remains as is, perhaps show a message when the selected % size is still larger than the content_width, similar to how you display a message when background/text colours are hard to read. This would at least tell people that yeah, you've selected a smaller size, but you may not see a difference since your image is really large. Just a thought, anyway. |
Right, and that is a bug. The image file size has (almost) nothing to do with displaying the image on the front-end. That is controlled by the browser and the It doesn't make sense to set the This is one of the things fixed in #11377. Been trying to split that PR so going to "port" the fix here. See # 7 in #11377 (comment) |
(stumbled on this while I was doing some image debugging): What still needs to be resolved for this issue: Perhaps we could rename the issue title to more accurately reflect the issue? |
Brainstorming... Image dimensions are relative to the original image. Clicking for instance 50%, 75%, 100% will expand the image beyond the boundry box. An example at 100%. The frontend will show the same preview as Full Size. Adjusting to 25% or 50% is visible at the frontend. Using 75% or 100% will not show any change on the frontend, but the backend shows the adjustment and it goes far out of the boundry box and out of the document. As seen in the above screenshot. The Image dimensions settings is a feature that needs to be fixed. |
I will close this issue so that we can instead focus on: |
Describe the bug
Image Dimension controls on the Image Block don't work.
Clicking the 25%/50%/75%/100% buttons doesn't change the size of the image.
If you click the down arrow on the width or height control, it first resets to 1 for some reason (rather than reducing the width/height by 1), and when you keep increasing or decreasing the width/height, the image size doesn't change, nor does the corresponding value in the other number field.
Vid: https://cl.ly/e369824b62d5
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Clicking the image dimension buttons or changing the number fields should change the image size.
Clicking the down arrow on the number field shouldn't reset the value to 1.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: