[wp-trac] [WordPress Trac] #62345: Issue on Google Chrome with lazy=load images = sizes=auto + css width: fit-content

WordPress Trac noreply at wordpress.org
Mon Nov 4 20:00:17 UTC 2024


#62345: Issue on Google Chrome with lazy=load images = sizes=auto  + css width:
fit-content
--------------------------+-----------------------------
 Reporter:  mosne         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:  needs-testing
  Focuses:  css           |
--------------------------+-----------------------------
 == Bug Report
 === Description
 WordPress 6.7 adds sizes=”auto” for lazy-loaded images.
 On Chrome those images are rendered smaller.
 this happens only in chrome. On Firefox and Safari the srcset is loaded
 correctly.
 I would say that is more a Google Chrome issue than a WordPress issue...
 but better double check :)

 === Environment
 - WordPress: 6.7-RC2-59332
 - PHP: 7.4.30
 - Server: Apache/2.4.43 (Unix)
 - Database: mysqli (Server: 8.0.16 / Client: mysqlnd 7.4.30)
 - Browser: Chrome 130.0.0.0
 - OS: macOS
 - Theme: Twenty Twenty-Five 1.0
 - MU Plugins: None activated
 - Plugins:
   * Create Block Theme 2.6.0
   * Test Reports 1.1.0
   * Theme Check 20231220
   * WordPress Beta Tester 3.6.1
   * WordPress Importer 0.8.3

 === Steps to Reproduce

 1. add to a page several large images
 2. the first 3 images are loaded without load=lazy for better performance
 3. 🐞 starting from the third (only in Chrome and only on the front
 office) the Bug occurs. the image size is smaller.


 === Expected Results
 1.  all the images are loaded large

 === Actual Results
 1.  ❌ the wrong size is loaded whene load=lazy + size=auto

 === Additional Notes
 - removing the width:fit-content seems to fix the isseu

 === Supplemental Artifacts

 - here a video of the bug
 https://www.loom.com/share/450632ee4bf34aa3ba27720b26a7f0a4?sid=3e6dc4c4
 -f78e-44fa-9719-373acb2f3242

 - also visible here at the end of the video (for ticket #62272)
 https://kdrive.infomaniak.com/app/share/565596/5078577d-176e-4877-aa1c-
 edc96fe041f0

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62345>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list