Function: the_post_thumbnail_url

the_post_thumbnail_url( string | array $size )

Display the post thumbnail URL.


Name Type(s) Default Value Description
$size string | array 'post-thumbnail'

Optional. Image size to use. Accepts any valid image size, or an array of width and height values in pixels (in that order). Default 'post-thumbnail'.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.