wp_get_attachment_thumb_file ( $post_id = 0 )

  • (int) post_id Optional. Attachment ID. Default is the ID of the global `$post`.
  • (string|false) Thumbnail file path on success, false on failure.
Defined at:


Retrieves thumbnail for an attachment.Note that this works only for the (very) old image metadata style where 'thumb' was set, and the 'sizes' array did not exist. This function returns false for the newer image metadata style despite that 'thumbnail' is present in the 'sizes' array.

Related Functions

wp_get_attachment_thumb_url, wp_get_attachment_url, wp_ajax_set_attachment_thumbnail, wp_get_attachment_image, wp_delete_attachment_files

Top Google Results

User discussions

wpseek mobile