apply_filters( 'wp_get_attachment_image_attributes', string[] $attr, WP_Post $attachment, string|int[] $size )
Filters the list of attachment image attributes.
Parameters
- $attr
-
(string[]) Array of attribute values for the image markup, keyed by attribute name. See wp_get_attachment_image().
- $attachment
-
(WP_Post) Image attachment post.
- $size
-
(string|int[]) Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).
Source
File: wp-includes/media.php
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_get_attachment_image_attributes