get_the_post_thumbnail_url ( $post = null, $size = 'post-thumbnail' )

  • (int|WP_Post) post Optional. Post ID or WP_Post object. Default is global `$post`.
  • (string|int[]) size Optional. Registered image size to retrieve the source for or a flat array of height and width dimensions. Default 'post-thumbnail'.
  • (string|false) Post thumbnail URL or false if no image is available. If `$size` does not match any registered image size, the original image URL will be returned.
Defined at:


Returns the post thumbnail URL.

Related Functions

the_post_thumbnail_url, get_the_post_thumbnail, the_post_thumbnail, get_the_post_thumbnail_caption, get_post_thumbnail_id

Top Google Results

User discussions

wpseek mobile