[wp-trac] [WordPress Trac] #56588: WordPress puts "loading=lazy" on first image on archive page - wp_get_loading_attr_default bug
WordPress Trac
noreply at wordpress.org
Mon May 22 20:45:49 UTC 2023
#56588: WordPress puts "loading=lazy" on first image on archive page -
wp_get_loading_attr_default bug
--------------------------------------+--------------------------
Reporter: salvoaranzulla | Owner: flixos90
Type: defect (bug) | Status: assigned
Priority: high | Milestone: 6.3
Component: Media | Version: 5.9
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: performance
--------------------------------------+--------------------------
Comment (by costdev):
Thanks for the updated test instructions @flixos90!
== Test Report
Patch tested: https://patch-diff.githubusercontent.com/raw/WordPress
/wordpress-develop/pull/4439.diff
=== Steps to Reproduce or Test
1. Create a post with a featured image.
2. Create another post with no featured image, but insert a Classic Block
and add 3 images inside it.
3. View the category page. You should only see the featured image.
4. 🐞 Inspect the featured image.
=== Expected Results
When reproducing a bug:
- ❌ The featured image should have `loading="lazy"`.
When testing a patch to validate it works as expected:
- ✅ The featured image should not have `loading="lazy"`.
=== Environment
- WordPress: 6.3-alpha-55505
- PHP: 7.4.33
- Server: Apache/2.4.56 (Ubuntu)
- Database: mysqli (Server: 5.7.41-0ubuntu0.18.04.1 / Client: mysqlnd
7.4.33)
- Browser: Chrome 113.0.0.0 (Windows 10/11)
- Theme: Twenty Nineteen, Twenty-Twenty One, Twenty-Twenty Two, Twenty-
Twenty Three
- MU-Plugins: None activated
- Plugins: None activated
==== Actual Results
When reproducing a bug/defect:
- ❌ The featured image had `loading="lazy"`. Issue reproduced on all
tested themes.
When testing the bugfix patch:
- ✅ The featured image did not have `loading="lazy"`. Issue resolved with
the patch on all tested themes.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56588#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list