[wp-trac] [WordPress Trac] #17262: wp_get_attachment_thumb_file should check new 'thumbnail' image size
WordPress Trac
noreply at wordpress.org
Thu Nov 11 08:02:18 UTC 2021
#17262: wp_get_attachment_thumb_file should check new 'thumbnail' image size
----------------------------------------+-----------------------------
Reporter: lonnylot | Owner: SergeyBiryukov
Type: enhancement | Status: reviewing
Priority: normal | Milestone: Future Release
Component: Media | Version: 3.0
Severity: normal | Resolution:
Keywords: good-first-bug needs-patch | Focuses: performance
----------------------------------------+-----------------------------
Changes (by markhowellsmead):
* focuses: => performance
Comment:
The function `wp_get_registered_image_subsizes` indicates that the actual
size key in the array is `thumbnail`. The default value of the size
parameter in `get_the_post_thumbnail` is `post-thumbnail`. It might be
worth considering reviewing this conflict.
The specific issue which has caused me to provide feedback to this ticket
is `render_block_core_post_featured_image` in the new wp-includes/blocks
/post-featured-image.php file. If the issue with get_the_post_thumbnail
can't be resolved, it may be a simpler solution (for this case) to modify
the line…
{{{
$featured_image = get_the_post_thumbnail( $post_ID );
}}}
…to…
{{{
$featured_image = get_the_post_thumbnail( $post_ID, 'thumbnail' );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/17262#comment:55>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list