#62597 closed defect (bug) (fixed)
WordPress 6.7 sizes="auto" is messing featured image on chrome mobile.
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.7.2 | Priority: | normal |
Severity: | normal | Version: | 6.7 |
Component: | Post Thumbnails | Keywords: | has-patch has-test-info has-screenshots fixed-major dev-reviewed |
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 (20)
This ticket was mentioned in PR #7910 on WordPress/wordpress-develop by @sainathpoojary.
6 months 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
@
6 months 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
@
6 months 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
@
6 months 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
@
6 months 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
@
5 months ago
Can the dev team please prioritize the fix for the next hotfix release? The icons have been looking broken for weeks.
This ticket was mentioned in Slack in #core-media by archon810. View the logs.
5 months ago
This ticket was mentioned in Slack in #core by archon810. View the logs.
4 months ago
@joemcgill commented on PR #7910:
4 months ago
#11
Alternately, I think we could consider disabling auto-sizes prior to generating this image markup in _wp_post_thumbnail_html()
here.
#12
@
4 months ago
- Milestone changed from Awaiting Review to 6.8
- Owner set to joemcgill
- Status changed from new to reviewing
I've left some feedback on the PR. @sainathpoojary are you able to update the approach?
#13
@
4 months ago
Hey @joemcgill,
I’ve updated the PR to remove width: auto
as suggested and have tested the featured image with multiple image sizes. Whenever you have a moment, I’d appreciate it if you could take a look.
Testing video: https://rioudcpuyg.ufs.sh/f/PL8E4NiPUWyOSGEvqvLiQ4fwdzrJyI7ZFLWB3XOnMKUARmPD
@joemcgill commented on PR #7910:
4 months ago
#14
#16
@
3 months ago
- Keywords fixed-major dev-feedback added
- Milestone changed from 6.8 to 6.7.2
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for consideration for 6.7.2.
Reproduction Report
Description
This report validates whether the issue can be reproduced.
Environment
Actual Results
Supplemental Artifacts