Making WordPress.org


Ignore:
Timestamp:
03/02/2021 09:58:57 PM (4 years ago)
Author:
coffee2code
Message:

Main theme: Add lazy loading to showcase images on front page.

Props jonoaldersonwp.
Fixes #5646.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/front-page.php

    r10691 r10738  
    244244                            $thumbnail = has_post_thumbnail( $showcase_post->ID )
    245245                                ? get_the_post_thumbnail( $showcase_post->ID, 'showcase-thumbnail' )
    246                                 : sprintf( '<img src="%1$s" width="220" alt="%2$s" />', esc_url( $rosetta->screenshot_url( $post_url, 220 ) ), esc_attr( $showcase_post->post_title ) );
     246                                : sprintf( '<img src="%1$s" width="220" loading="lazy" alt="%2$s" />', esc_url( $rosetta->screenshot_url( $post_url, 220 ) ), esc_attr( $showcase_post->post_title ) );
    247247
    248248                            printf(
Note: See TracChangeset for help on using the changeset viewer.