wp_img_tag_add_loading_attr

wp_img_tag_add_loading_attr

Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('wp_img_tag_add_loading_attr') is found 1 times:

  • /wp-includes/deprecated.php line 4800
    4796
    4797
    4798
    4799
    4800
    4801
    4802
    4803
    4804
    4805
        return $image;
    }
     
    /** This filter is documented in wp-admin/includes/media.php */
    $value = apply_filters( 'wp_img_tag_add_loading_attr', $value, $image, $context );
     
    if ( $value ) {
        if ( ! in_array( $value, array( 'lazy', 'eager' ), true ) ) {
            $value = 'lazy';
        }

See this hook used in plugins: