Case ce-0139-image-resize-aspect-ratio · Scenario scenario-image-resize

Image resize does not preserve aspect ratio by default

OS: Windows 11 Device: Desktop or Laptop Any Browser: Chrome 120.0 Keyboard: US Status: draft
image resize aspect-ratio chrome

Phenomenon

When resizing an image in a contenteditable element, the aspect ratio is not preserved by default. Images become distorted when resized, requiring manual aspect ratio preservation.

Reproduction example

  1. Insert an image into contenteditable
  2. Resize the image by dragging
  3. Observe image distortion

Observed behavior

  • Image width and height change independently
  • Aspect ratio is not maintained
  • Image becomes distorted
  • Requires manual calculation to preserve ratio

Expected behavior

  • Aspect ratio should be preserved by default
  • Or option to preserve aspect ratio
  • Images should not become distorted
  • Resize should be intuitive

Browser Comparison

  • All browsers: Aspect ratio not preserved by default
  • Custom implementation needed for aspect ratio preservation

Notes and possible direction for workarounds

  • Implement custom resize with aspect ratio lock
  • Calculate height based on width change
  • Use Shift key modifier to toggle aspect ratio lock
  • Provide visual feedback during resize
Before
Image
Original image (200x150, ratio 4:3)
After Resize (Bug)
Image
After resize, ratio damaged (300x150, distorted)
vs
✅ Expected
Image
Expected: Ratio maintained (300x225, 4:3 ratio preserved)

Browser compatibility matrix

This matrix shows which browser and OS combinations have documented cases for this scenario. The current case is highlighted. Click on a cell to view other cases.

Current case
Confirmed
Draft
No case documented

All variants (detailed table)

Complete list of all cases for this scenario with full environment details.

Case OS Device Browser Keyboard Status
ce-0109-image-resize-limited Windows 11 Desktop or Laptop Any Chrome 120.0 US draft
ce-0139-image-resize-aspect-ratio Windows 11 Desktop or Laptop Any Chrome 120.0 US draft

Playground for this case

Use the reported environment as a reference and record what happens in your environment while interacting with the editable area.

Reported environment
OS: Windows 11
Device: Desktop or Laptop Any
Browser: Chrome 120.0
Keyboard: US
Your environment
Sample HTML:
Event log
Use this log together with the case description when filing or updating an issue.
0 events
Interact with the editable area to see events here.

Comments & Discussion

Have questions, suggestions, or want to share your experience? Join the discussion below.