Make WordPress Core

Opened 4 years ago

Closed 2 years ago

Last modified 12 months ago

#51856 closed defect (bug) (worksforme)

loading="lazy" attribute bug

Reported by: lovor's profile lovor Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.5.3
Component: Media Keywords: close
Focuses: template Cc:

Description

Adding of loading="lazy" attribute cannot be prevented; even when placing

add_filter( 'wp_lazy_loading_enabled', '__return_false' );

in functions.php. Further, loading="lazy" is added to all images, event to images in page templates (e.g. header.php), which already have loading="eager" attribute.

Change History (4)

#1 @SergeyBiryukov
4 years ago

  • Component changed from General to Media

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


4 years ago

#3 @Mista-Flo
2 years ago

  • Keywords close added; needs-patch removed
  • Resolution set to worksforme
  • Status changed from new to closed

Can't reproduce, I tried to add the filter in a mu-plugin for example, and the lazy load attribute was properly removed.

#4 @swissspidy
12 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.