From fb3ea1ce9011b715a0192991c4f97ed19e4ac9a8 Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Wed, 28 Aug 2024 13:06:16 +1200 Subject: [PATCH] Theme: Revert to only eagerly loading the first 3 card images See https://github.com/WordPress/Learn/issues/2679 --- wp-content/themes/pub/wporg-learn-2024/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-content/themes/pub/wporg-learn-2024/functions.php b/wp-content/themes/pub/wporg-learn-2024/functions.php index 8ba495a74..986143fd8 100644 --- a/wp-content/themes/pub/wporg-learn-2024/functions.php +++ b/wp-content/themes/pub/wporg-learn-2024/functions.php @@ -159,7 +159,7 @@ function eager_load_first_card_rows_images( $attr, $attachment, $size ) { if ( is_front_page() || is_archive() || is_search() || is_page( 'my-courses' ) ) { $image_count++; - if ( $image_count <= 6 ) { + if ( $image_count <= 3 ) { $attr['loading'] = 'eager'; $attr['fetchpriority'] = 'high'; }