apply_filters( 'wp_img_tag_add_decoding_attr', string|false|null $value, string $image, string $context )

Filters the decoding attribute value to add to an image. Default async.


Returning a falsey value will omit the attribute.

Top ↑


$value string|false|null
The decoding attribute value. Returning a falsey value will result in the attribute being omitted for the image.
Otherwise, it may be: 'async' (default), 'sync', or 'auto'.
$image string
The HTML img tag to be filtered.
$context string
Additional context about how the function was called or where the img tag is.

Top ↑


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

$value = apply_filters( 'wp_img_tag_add_decoding_attr', 'async', $image, $context );

Top ↑


Version Description
6.1.0 Introduced.

Top ↑

User Contributed Notes

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