apply_filters( ‘wp_lazy_loading_enabled’, bool $default, string $tag_name, string $context )

Filters whether to add the loading attribute to the specified tag in the specified context.

Parameters

$defaultbool
Default value.
$tag_namestring
The tag name.
$contextstring
Additional context, like the current filter name or the function name from where this was called.

Source

* See https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-loading

Changelog

VersionDescription
5.5.0Introduced.

User Contributed Notes

  1. Skip to note 2 content

    To disable lazy loading use:

    add_filter( 'wp_lazy_loading_enabled', '__return_false' );

You must log in before being able to contribute a note or feedback.