Title: admin_post_thumbnail_html
Published: April 25, 2014
Last modified: February 24, 2026

---

# apply_filters( ‘admin_post_thumbnail_html’, string $content, int $post_id, int|null $thumbnail_id )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/admin_post_thumbnail_html/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/admin_post_thumbnail_html/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/admin_post_thumbnail_html/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/admin_post_thumbnail_html/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/hooks/admin_post_thumbnail_html/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/hooks/admin_post_thumbnail_html/?output_format=md#wp--skip-link--target)

Filters the admin post thumbnail HTML markup to return.

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

 `$content`string

Admin post thumbnail HTML markup.

`$post_id`int

Post ID.

`$thumbnail_id`int|null

Thumbnail attachment ID, or null if there isn’t one.

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

    ```php
    return apply_filters( 'admin_post_thumbnail_html', $content, $post->ID, $thumbnail_id );
    ```

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

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

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

Returns HTML for the post thumbnail meta box.

  |

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

| Version | Description | 
| [4.6.0](https://developer.wordpress.org/reference/since/4.6.0/) | Added the `$thumbnail_id` parameter. | 
| [3.5.0](https://developer.wordpress.org/reference/since/3.5.0/) | Added the `$post_id` parameter. | 
| [2.9.0](https://developer.wordpress.org/reference/since/2.9.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/hooks/admin_post_thumbnail_html/?output_format=md#user-contributed-notes)󠁿

 1.   [Skip to note 3 content](https://developer.wordpress.org/reference/hooks/admin_post_thumbnail_html/?output_format=md#comment-content-2217)
 2.    [Jonathan Goldford](https://profiles.wordpress.org/jg-visual/)  [  9 years ago  ](https://developer.wordpress.org/reference/hooks/admin_post_thumbnail_html/#comment-2217)
 3.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_post_thumbnail_html%2F%23comment-2217)
     Vote results for this note: 1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_post_thumbnail_html%2F%23comment-2217)
 4.  Below is an example of how to use this filter to provide some additional text 
     to admins on what size image to use for their featured images. If an image is 
     currently in place, this text will show above it. If not, the help text will show
     just above the “Set featured image” link.
 5.      ```php
         function filter_featured_image_admin_text( $content, $post_id, $thumbnail_id ){
             $help_text = '<p>' . __( 'Please use an image that is 1170 pixels wide x 658 pixels tall.', 'my_domain' ) . '</p>';
             return $help_text . $content;
         }
         add_filter( 'admin_post_thumbnail_html', 'filter_featured_image_admin_text', 10, 3 );
         ```
     
 6.   [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_post_thumbnail_html%2F%3Freplytocom%3D2217%23feedback-editor-2217)
 7.   [Skip to note 4 content](https://developer.wordpress.org/reference/hooks/admin_post_thumbnail_html/?output_format=md#comment-content-6123)
 8.    [Azhar Khan](https://profiles.wordpress.org/officialazhark/)  [  4 years ago  ](https://developer.wordpress.org/reference/hooks/admin_post_thumbnail_html/#comment-6123)
 9.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_post_thumbnail_html%2F%23comment-6123)
     Vote results for this note: 1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_post_thumbnail_html%2F%23comment-6123)
 10. Doesn’t work with new Gutenberg.
 11. There’s a open discussion going on for this.
 12. [https://github.com/WordPress/gutenberg/issues/12742](https://github.com/WordPress/gutenberg/issues/12742)
 13.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadmin_post_thumbnail_html%2F%3Freplytocom%3D6123%23feedback-editor-6123)

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