#54383 closed defect (bug) (duplicate)
wp_get_attachment_thumb_file looks for $imagedata['thumb'] but wp_create_image_subsizes doesn't create this array entry
Reported by: | markhowellsmead | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | major | Version: | 5.8.1 |
Component: | Media | Keywords: | |
Focuses: | Cc: |
Description
This has come up at https://github.com/WordPress/gutenberg/issues/33789. Calling get_the_post_thumbnail
without the size parameter, or with the size parameter set explicitly to post-thumbnail
(but not thumbnail
), returns the full-size image. This is because wp_get_attachment_thumb_file
looks for the array key thumb
in the attachment metadata, but wp_create_image_subsizes
doesn't generate it.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Amazing that this has been there since version 2.1. I wonder if there is another ticket for this?
The standard sizes are listed in
get_intermediate_image_sizes()
.$image_sizes = array('thumbnail', 'medium', 'medium_large', 'large'); // Standard sizes
yet
wp_get_attachment_thumb_file()
checks for['thumb']
.