Opened 10 years ago
Closed 6 years ago
#18254 closed enhancement (worksforme)
Preserve image aspect ratio when editing dimensions manually in post editor
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.2.1 |
Component: | Media | Keywords: | has-patch dev-feedback |
Focuses: | Cc: |
Description
The dialog box that pops up when the user clicks the "edit image" icon that appears on hovering over an image in the visual editor has an "Advanced settings" tab with input fields for the pixel dimensions of the image.
When one is updated, the other does not change. A popular feature of image management software is to "link" the values and preserve the aspect ratio of the image.
I propose that WordPress have the option (a checkbox by the inputs?) to do this.
Sorry if this is terse; I'm about to be kicked off this library machine and I can't come back until tomorrow. Comment with anything I need to add and I'll update when I can.
Attachments (1)
Change History (4)
#3
@
6 years ago
- Milestone Awaiting Review deleted
- Resolution set to worksforme
- Status changed from new to closed
Thanks @asdasDan for the patch but we went in a different direction. This is fixed in the new Edit Image modal we added when upgrading to TinyMCE 4.0. The image dimensions auto-adjust there.
Added a patch, realized it may be odd because of not having the images added, but it essentially just puts a link/broken link next to the resizing feature of an image, when it's set to link it adds a css class of constrained, any height/width values entered will adjust the other to match the original images aspect ratio. When unlinked, the css class is removed, and either value can be modified freely as usual.