Files
Filename | Hook Type | Line Number | PHP Doc |
---|---|---|---|
wp-includes/media.php | apply_filters | 2025 | /** * Filters whether to add the missing `width` and `height` HTML attributes to the img tag. Default `true`. * * Returning anything else than `true` will not add the attributes. * * @since 5.5.0 * * @param bool $value The filtered value, defaults to `true`. * @param string $image The HTML `img` tag where the attribute should be added. * @param string $context Additional context about how the function was called or where the img tag is. * @param int $attachment_id The image attachment ID. */ |
Hook Parameters
Parameter Type | Name | Description |
---|---|---|
bool | $value | The filtered value, defaults to `true`. |
string | $image | The HTML `img` tag where the attribute should be added. |
string | $context | Additional context about how the function was called or where the img tag is. |
int | $attachment_id | The image attachment ID. |