Make WordPress Core

Opened 6 years ago

Closed 4 years ago

Last modified 3 years ago

#51856 closed defect (bug) (worksforme)

loading="lazy" attribute bug

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

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
6 years ago

  • Component General → Media

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


6 years ago

#3 @Mista-Flo
4 years ago

  • Keywords close added; needs-patch removed
  • Resolution → worksforme
  • Status new → 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
3 years ago

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