On this page
apply_filters( 'get_image_tag', string $html, int $id, string $alt, string $title, string $align, string|int[] $size )
Filters the HTML content for the image tag.
Parameters
$htmlstring-
HTML content for the image.
$idint-
Attachment ID.
$altstring-
Image description for the alt attribute.
$titlestring-
Image description for the title attribute.
$alignstring-
Part of the class name for aligning the image.
$sizestring|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. View all references
return apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size );
Related
Used By
| Used By | Description |
|---|---|
| get_image_tag() wp-includes/media.php | Gets an img tag for an image attachment, scaling it down if requested. |
Changelog
| Version | Description |
|---|---|
| 2.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_image_tag