Filters the decoding attribute value to add to an image. Default 'async'.
$valuestring|false|null$imagestring$contextstringwp-includes/deprecated.php:6041wp_img_tag_add_decoding_attr()wp-includes/media.php:2273wp_img_tag_add_loading_optimization_attrs() * will result in the attribute being omitted for the image. * Otherwise, it may be: 'async', 'sync', or 'auto'. Defaults to false. * @param string $image The HTML `img` tag to be filtered. * @param string $context Additional context about how the function was called * or where the img tag is. */ $filtered_decoding_attr = apply_filters( 'wp_img_tag_add_decoding_attr', $optimization_attrs['decoding'] ?? false, $image, $context );Introduced in 6.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.