#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: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Media | Version: | 5.8.1 |
| Severity: | major | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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 sizesyet
wp_get_attachment_thumb_file()checks for['thumb'].