wp_get_attachment_thumb_file


wp_get_attachment_thumb_file ( $post_id = 0 )

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

Description

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_delete_attachment_files, wp_get_attachment_image

Top Google Results

User discussions

wpseek mobile