Title: get_header_image_tag
Published: December 9, 2015
Last modified: August 20, 2026

---

# apply_filters( ‘get_header_image_tag’, string $html, object $header, array $attr )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/get_header_image_tag/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/get_header_image_tag/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/get_header_image_tag/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/get_header_image_tag/?output_format=md#changelog)

Filters the markup of header images.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/get_header_image_tag/?output_format=md#parameters)󠁿

 `$html`string

The HTML image tag markup being filtered.

`$header`object

The custom header object returned by ‘[get_custom_header()](https://developer.wordpress.org/reference/functions/get_custom_header/)‘.

`$attr`array

Array of the attributes for the image tag.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/get_header_image_tag/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'get_header_image_tag', $html, $header, $attr );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/theme.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/theme.php#L1370)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/theme.php#L1370-L1370)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/get_header_image_tag/?output_format=md#related)󠁿

| Used by | Description | 
| [get_header_image_tag()](https://developer.wordpress.org/reference/functions/get_header_image_tag/)`wp-includes/theme.php` |

Creates image tag markup for a custom header image.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/get_header_image_tag/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.4.0](https://developer.wordpress.org/reference/since/4.4.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fget_header_image_tag%2F)
before being able to contribute a note or feedback.