[wp-trac] [WordPress Trac] #57490: Cannot control lazy-loading behavior on a featured image

WordPress Trac noreply at wordpress.org
Thu Jan 19 07:32:43 UTC 2023


#57490: Cannot control lazy-loading behavior on a featured image
--------------------------------------+--------------------------
 Reporter:  flixos90                  |       Owner:  flixos90
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  6.2
Component:  Media                     |     Version:  5.5
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------
Changes (by flixos90):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55093" 55093]:
 {{{
 #!CommitTicketReference repository="" revision="55093"
 Media: Allow for customization of lazy-loading featured images.

 When lazy-loading images was introduced, in [52065] the check for
 `wp_lazy_loading_enabled()` was omitted by accident in the logic to set
 the attribute with its default value on `img` tags from
 `get_the_post_thumbnail()`. Without this check, it is impossible for
 third-party developers to modify the behavior for featured images.

 This changeset fixes the problem by introducing the check.

 Props flixos90, joemcgill, mukesh27.
 Fixes #57490.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57490#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list