[wp-trac] [WordPress Trac] #56930: Block themes: improve omitting lazy-loading attribute on first content image/iframe
WordPress Trac
noreply at wordpress.org
Fri Feb 3 15:04:03 UTC 2023
#56930: Block themes: improve omitting lazy-loading attribute on first content
image/iframe
--------------------------------------+--------------------------
Reporter: adamsilverstein | Owner: flixos90
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.2
Component: Media | Version: 5.9
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: performance
--------------------------------------+--------------------------
Comment (by antonvlasenko):
== Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/3560
=== Environment
* OS: macOS 13.1
* Web Server: Apache 2
* PHP: 8.1.14
* WordPress: 6.2-alpha-54642-src
* Browser: Safari 16.2
* Theme: Twenty Twenty-Three
* No Active Plugins
The test steps are taken from https://github.com/WordPress/wordpress-
develop/pull/3560 's desription.
=== Steps
1. Activate the `Twenty Twenty-Three` theme.
2. Create a post with 2 `core/image` blocks.
3. On the same post, set a featured image. Save the post.
4. Go to the Site Editor and edit the `Header` and the `Footer` template
parts.
5. Add 1 `core/image` block to each of the template part and save them.
=== Actual Results
1. Open the post on FE.
2. โ
Out of 2 images that were added on step 2 (see `Steps` above), the
first image does not have a loading="lazy" attribute, while the second
does have it.
3. Open home page.
4. โ
The featured image does not have a `loading="lazy"` attribute.
5. โ๐The image that was placed in the `Header` does have a
`loading="lazy"`. Please see the screenshot below:
[[Image(https://cldup.com/ckEdnrnSIy.png)]]
6. โ
The image that was placed in the `Footer` does have a
`loading="lazy"`.
=== Expected Results
- The image that was placed in the `Header` must not have a
`loading="lazy"`. This should be fixed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56930#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list