apply_filters( ‘wp_omit_loading_attr_threshold’, int $omit_threshold )

Filters the threshold for how many of the first content media elements to not lazy-load.

Description

For these first content media elements, the loading attribute will be omitted. By default, this is the case for only the very first content media element.

Parameters

$omit_thresholdint
The number of media elements where the loading attribute will not be added. Default 3.

Source

$omit_threshold = apply_filters( 'wp_omit_loading_attr_threshold', 3 );

Changelog

VersionDescription
6.3.0The default threshold was changed from 1 to 3.
5.9.0Introduced.

User Contributed Notes

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