Opened 7 weeks ago
Last modified 4 weeks ago
#62597 new defect (bug)
WordPress 6.7 sizes="auto" is messing featured image on chrome mobile.
Reported by: | maciejmackowiak | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.7 |
Component: | Post Thumbnails | Keywords: | has-patch has-testing-info has-screenshots |
Focuses: | ui, css, administration | Cc: |
Description
WordPress 6.7 added sizes=”auto” for some images.
In wp-admin on chrome when we have the classic editor plugin active the featured image is "squashed".
This seems to be the issues with css rule height: auto
for #postimagediv .inside img
which cannot be simply overriden, it needs to be deleted to fix the issue.
The easiest way to reproduce is to set featured image to any square image.
Change History (9)
This ticket was mentioned in PR #7910 on WordPress/wordpress-develop by @sainathpoojary.
7 weeks ago
#2
- Keywords has-patch added
Remove height: auto
from #postimagediv .inside img
to prevent distortion of featured images in the Classic Editor.
Trac ticket: #62597
#3
@
7 weeks ago
- Keywords has-testing-info has-screenshots added
Test Report
Description
This report validates that the indicated patch works as expected.
Environment
- WordPress: 6.7.1
- PHP: 8.1.29
- Server: nginx/1.16.0
- Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.29)
- Browser: Chrome 131.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.0
- Plugins:
- Classic Editor 1.6.6
Actual Results
✅ Issue resolved with patch.
Supplemental Artifacts
Screenshot - https://postimg.cc/62kDGbkG
#4
@
7 weeks ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/7910
Environment
- WordPress: 6.8-alpha-59274-src
- PHP: 8.2.26
- Server: nginx/1.27.3
- Database: mysqli (Server: 8.0.40 / Client: mysqlnd 8.2.26)
- Browser: Chrome 131.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.0
- MU Plugins: None activated
- Plugins:
- Classic Editor 1.6.6
- Test Reports 1.2.0
Actual Results
- ✅ Issue resolved with patch.
Supplemental Artifacts
Before
https://utfs.io/f/TTyF6MLuAyHDeFFbRaerQjuAYVHZvEhTSDrJIM8mRCfKXya7
After
https://utfs.io/f/TTyF6MLuAyHDfX4HnIyUy7JRH3j6GQamK94Eq8WIpX2sYnuC
#6
@
7 weeks ago
Hi there, Thanks for ticket.
Instead of removing the CSS we should add CSS that we added in frontend in [59415]
img:is([sizes="auto" i], [sizes^="auto," i]) { contain-intrinsic-size: 3000px 1500px; }
#7
@
7 weeks ago
hey @mukesh27,
I attempted to implement the provided CSS solution:
img:is([sizes="auto" i], [sizes^="auto," i]) { contain-intrinsic-size: 3000px 1500px; }
However, this resulted in behavior that seems different from what we had in WordPress v6.6.1. Here’s the comparison:
https://utfs.io/f/PL8E4NiPUWyODJv0JdAHytsWpNIfogBi6bRx3aQ5ZFMdLhY1
But after adding the suggested CSS, this is the current result:
https://utfs.io/f/PL8E4NiPUWyOqSCREtFX9AiSFV8fHmyxUp5oh3rcqWCNB1LI
This issue appears to be linked to the fact that we previously set height: auto
, which allowed the image to take its contain-intrinsic-size (1500px), as shown in the preview below:
Also, I noticed some inconsistencies between Firefox and Chrome after following thecontain-intrinsic-size
approach:
Although removing height:auto was working as intended because it was taking the actual height of the image
While the removal of height: auto
behavior seems to work as expected, I’m curious about your thoughts on this. Could there be another approach to fix the issue while maintaining consistency across browsers? Any advice would be appreciated!
#8
@
4 weeks ago
Can the dev team please prioritize the fix for the next hotfix release? The icons have been looking broken for weeks.
Reproduction Report
Description
This report validates whether the issue can be reproduced.
Environment
Actual Results
Supplemental Artifacts