A WordPress-centric search engine for devs and theme authors

admin_post_thumbnail_size ›

apply_filters( 'admin_post_thumbnail_size', $size, $thumbnail_id, $post )
Parameters: (3)
  • (string|array) $size Post thumbnail image size to display in the meta box. Accepts any valid image size, or an array of width and height values in pixels (in that order). If the 'post-thumbnail' size is set, default is 'post-thumbnail'. Otherwise, default is an array with 266 as both the height and width values.
    Required: Yes
  • (int) $thumbnail_id Post thumbnail attachment ID.
    Required: Yes
  • (WP_Post) $post The post object associated with the thumbnail.
    Required: Yes
Defined at:

Filters the size used to display the post thumbnail image in the 'Featured Image' meta box.

Note: When a theme adds 'post-thumbnail' support, a special 'post-thumbnail' image size is registered, which differs from the 'thumbnail' image size managed via the Settings > Media screen. See the $size parameter description for more information on default values.


$size = apply_filters( 'admin_post_thumbnail_size', $size, $thumbnail_id, $post );