Felix Arntz
1da2841c07
Media: Enhance logic to determine LCP image in block themes and avoid lazy-loading it.
...
[52065] originally introduced the logic to guess the LCP image based on certain heuristics and to not lazy-load that image. However, with the introduction of block themes, that logic was not functioning correctly, resulting in all featured images to be lazy-loaded, regardless of whether it was the LCP image or not.
Together with an update to the `core/post-featured-image` block included in [55079], this changeset fixes the logic to correctly handle featured images in block themes as well.
Additionally, in combination with an update to the `core/template-part` block from [55246], this changeset includes an enhancement which uses the benefits of block template parts to avoid lazy-loading images in the `header` block template part, making the lazy-loading heuristics even more accurate for sites using a block theme.
Props flixos90, adamsilverstein, mamaduka, antonvlasenko, shahidul95, reduanmasud, costdev, mukesh27, ironprogrammer, manfcarlo, robinwpdeveloper, spacedmonkey.
Fixes #56930 .
Built from https://develop.svn.wordpress.org/trunk@55318
git-svn-id: http://core.svn.wordpress.org/trunk@54851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-13 18:34:17 +00:00
..
2023-02-07 13:00:09 +00:00
2023-02-07 18:11:18 +00:00
2023-02-07 13:00:09 +00:00
2023-02-11 17:39:20 +00:00
2023-02-07 17:10:21 +00:00
2023-02-10 10:59:25 +00:00
2022-10-04 02:08:11 +00:00
2023-01-20 01:36:10 +00:00
2023-02-08 19:40:19 +00:00
2022-12-08 19:31:17 +00:00
2022-12-06 12:19:15 +00:00
2022-12-12 20:21:12 +00:00
2022-12-19 15:12:11 +00:00
2023-02-07 23:47:23 +00:00
2023-02-03 13:35:20 +00:00
2022-09-26 14:00:10 +00:00
2023-02-01 16:15:15 +00:00
2022-11-26 21:01:17 +00:00
2023-02-07 17:10:21 +00:00
2023-02-07 17:10:21 +00:00
2023-02-02 18:52:17 +00:00
2023-02-06 19:40:16 +00:00
2023-02-02 19:38:19 +00:00
2023-02-13 18:34:17 +00:00
2023-01-24 14:42:17 +00:00
2022-10-10 18:22:11 +00:00
2022-10-10 18:22:11 +00:00
2022-11-10 03:01:14 +00:00
2022-11-29 15:51:14 +00:00
2023-02-04 15:18:16 +00:00
2023-02-03 13:35:20 +00:00
2023-02-13 09:08:23 +00:00
2023-02-11 12:43:22 +00:00
2022-12-15 21:32:17 +00:00
2023-02-03 13:35:20 +00:00
2023-02-03 13:35:20 +00:00
2023-02-07 14:05:20 +00:00
2022-11-29 15:51:14 +00:00
2023-02-07 07:04:52 +00:00
2023-02-01 15:29:13 +00:00
2023-02-06 15:24:16 +00:00
2022-11-29 21:00:14 +00:00
2022-11-23 21:30:13 +00:00
2023-02-07 17:10:21 +00:00
2023-02-07 17:10:21 +00:00
2023-02-07 17:10:21 +00:00
2023-02-07 17:10:21 +00:00
2023-02-07 17:10:21 +00:00
2023-02-07 17:10:21 +00:00
2022-11-08 13:29:16 +00:00
2022-11-25 15:12:16 +00:00
2022-11-25 15:12:16 +00:00
2023-02-07 17:10:21 +00:00
2022-09-26 22:43:10 +00:00
2022-10-21 21:12:14 +00:00
2022-12-15 21:32:17 +00:00
2022-12-15 21:32:17 +00:00
2023-01-13 14:22:12 +00:00
2023-01-13 14:22:12 +00:00
2023-02-08 20:51:21 +00:00
2022-10-07 19:17:12 +00:00
2022-11-17 18:15:19 +00:00
2023-02-08 17:08:21 +00:00
2023-02-08 10:17:23 +00:00
2023-02-13 09:21:18 +00:00
2022-10-18 18:16:16 +00:00
2022-09-26 22:10:16 +00:00
2022-11-13 13:51:20 +00:00
2023-02-07 03:10:18 +00:00
2022-09-26 22:10:16 +00:00
2023-02-07 12:10:18 +00:00
2022-10-04 03:59:13 +00:00
2023-01-30 10:27:16 +00:00
2022-10-04 23:01:13 +00:00
2022-10-24 14:56:16 +00:00
2022-09-28 22:19:10 +00:00
2022-10-18 18:16:16 +00:00
2022-09-28 14:59:10 +00:00
2022-11-23 21:30:13 +00:00
2022-11-26 09:39:13 +00:00
2023-01-18 09:58:16 +00:00
2023-01-30 15:24:13 +00:00
2023-02-07 17:10:21 +00:00
2023-02-09 16:35:22 +00:00
2022-10-11 15:00:12 +00:00
2023-02-07 16:44:24 +00:00
2023-02-07 18:01:20 +00:00
2023-02-06 19:59:17 +00:00
2022-11-08 17:31:13 +00:00
2022-11-29 15:51:14 +00:00
2023-02-13 15:18:19 +00:00
2022-10-18 16:11:16 +00:00
2023-01-28 20:58:12 +00:00
2023-02-12 18:08:21 +00:00
2023-02-12 18:08:21 +00:00
2023-01-25 01:40:12 +00:00
2023-02-07 21:21:18 +00:00
2023-02-03 00:15:21 +00:00
2023-02-12 18:08:21 +00:00
2022-11-26 21:01:17 +00:00
2023-02-12 18:08:21 +00:00
2023-02-07 18:54:19 +00:00
2023-02-07 17:10:21 +00:00
2023-01-15 14:57:13 +00:00
2023-01-15 14:57:13 +00:00
2023-02-07 17:10:21 +00:00
2023-02-02 18:52:17 +00:00
2022-12-15 21:32:17 +00:00
2023-02-13 08:47:21 +00:00
2023-02-08 10:17:23 +00:00
2023-02-07 18:54:19 +00:00
2023-01-26 23:03:14 +00:00
2023-02-07 17:10:21 +00:00
2023-02-13 18:34:17 +00:00
2022-10-13 17:24:15 +00:00
2023-01-26 23:03:14 +00:00
2022-12-09 11:54:13 +00:00
2023-01-30 10:27:16 +00:00
2022-11-29 15:51:14 +00:00
2022-10-18 18:16:16 +00:00
2022-12-07 21:19:19 +00:00
2023-01-12 23:24:12 +00:00
2022-12-14 22:54:14 +00:00
2023-02-07 12:49:17 +00:00
2023-02-12 18:08:21 +00:00
2023-02-07 14:35:23 +00:00
2023-01-19 07:34:14 +00:00
2023-02-07 12:10:18 +00:00
2022-12-13 12:26:15 +00:00
2023-02-07 21:21:18 +00:00
2023-02-07 12:39:17 +00:00
2022-12-15 11:03:11 +00:00
2023-02-13 14:33:18 +00:00
2023-01-23 16:35:12 +00:00
2022-12-27 12:23:15 +00:00
2022-12-22 11:08:19 +00:00
2023-02-07 17:10:21 +00:00
2023-02-01 18:07:12 +00:00
2023-02-03 00:15:21 +00:00
2022-11-29 15:51:14 +00:00
2023-02-09 01:31:22 +00:00
2023-02-13 18:34:17 +00:00
2023-02-03 00:15:21 +00:00