[wp-trac] [WordPress Trac] #54383: wp_get_attachment_thumb_file looks for $imagedata['thumb'] but wp_create_image_subsizes doesn't create this array entry
WordPress Trac
noreply at wordpress.org
Fri Nov 5 09:17:34 UTC 2021
#54383: wp_get_attachment_thumb_file looks for $imagedata['thumb'] but
wp_create_image_subsizes doesn't create this array entry
-----------------------------+-----------------------------
Reporter: markhowellsmead | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 5.8.1
Severity: major | Keywords:
Focuses: |
-----------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54383>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list