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.


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.

Top ↑


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

Top ↑


File: wp-includes/media.php. View all references

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

Top ↑


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

Top ↑

User Contributed Notes

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