Skip to content

Commit

Permalink
Theme: Revert to only eagerly loading the first 3 card images
Browse files Browse the repository at this point in the history
See #2679
  • Loading branch information
adamwoodnz committed Aug 28, 2024
1 parent 9efd704 commit fb3ea1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-content/themes/pub/wporg-learn-2024/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit fb3ea1c

Please sign in to comment.