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.
6420*6421* @since 5.9.06422* @since 6.3.0 The default threshold was changed from 1 to 3.6423*6424* @param int$omit_threshold The number of media elements where the `loading` attribute will not be added.Default3.6425*/6426$omit_threshold=apply_filters('wp_omit_loading_attr_threshold',3);6427}64286429return$omit_threshold;6430}64316432/**
History
Introduced in 5.9.0. Unchanged from 6.7.7 through 7.1.0.