Make WordPress Core

Opened 11 months ago

Closed 3 months ago

Last modified 3 months ago

#59378 closed defect (bug) (reported-upstream)

Image Aspect Ratio Not Staying Fixed In Mobile View

Reported by: gpwebnut's profile gpwebnut Owned by:
Milestone: Priority: normal
Severity: major Version: 6.3.1
Component: Media Keywords:
Focuses: Cc:

Description

When an image size is adjusted within the post/page editor, by clicking on the image and dragging it, the aspect ratio of that image does not stay fixed when looking at it in mobile. The image width looks squished.

See this example page. (Ignore the date created. This was just created this morning.)
https://www.insidewaters.com/mobile-aspect-ratio-bug-test-page/

This problem is affecting hundreds of existing post/pages, not just newly created post/pages, and it would require an immense amount of work to fix manually on each image across multiple websites of ours.

You can see the problem on the page linked to below that was created awhile ago. The top camera picture gets squished in mobile.
https://www.tropicalsnorkeling.com/waterproof-snorkel-cameras/

All plugins and themes were turned off to test for conflicts.

Change History (4)

#1 @robemilak
10 months ago

Hi!

Confirming the same thing on my sites. The reason for this is WordPress update 6.3. where they added a new feature to Image Blocks, aspect ratio. Now, every image that had manually added height is wrongly shown on both mobile and desktop (mostly on mobile because of the screen's width).

For example, if I add an image that is 1000×500 and leave width and height as Auto, it is okay. But, if I resize that image, to 998×449, it will get broken, because now, WordPress is putting height to fixed value (449) and adjusting the width, which gets the image reshapen.

We've returned WordPress to 6.2., and it is okay for now. But that is not a solution for the long run.

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


3 months ago

#3 @antpb
3 months ago

  • Resolution set to fixed
  • Status changed from new to closed

Hi @gpwebnut in a Media meeting we were discussing this ticket and it looks like things are all fixed up on the page linked. There has also been this issue in the editor which is now solved: https://github.com/WordPress/gutenberg/issues/52739

Thank you for the report! Going to close this ticket.

#4 @desrosj
3 months ago

  • Milestone Awaiting Review deleted
  • Resolution changed from fixed to reported-upstream
Note: See TracTickets for help on using tickets.