[wp-trac] [WordPress Trac] #27273: thumbnail size aliases returning mixed results

WordPress Trac noreply at wordpress.org
Thu Mar 27 05:32:09 UTC 2014


#27273: thumbnail size aliases returning mixed results
-----------------------------+-----------------------------
 Reporter:  jadpm            |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Future Release
Component:  Post Thumbnails  |     Version:  2.5
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+-----------------------------
Changes (by jeremyfelt):

 * version:  trunk => 2.5
 * milestone:  Awaiting Review => Future Release


Comment:

 When a request to `get_the_post_thumbnail( $id, 'thumb' )` is made, it
 initiates this:

 * `wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon =
 false, $attr = '')`
 * `wp_get_attachment_image_src($attachment_id, $size='thumbnail', $icon =
 false)`
 * `image_downsize($id, $size = 'medium')`

 In `image_downsize()`, we look for an intermediate size of '''thumb''' via
 `image_get_intermediate_size()`, which checks post meta for all sizes
 associated with the attachment. By default, a size exists for thumbnail,
 not thumb, and it returns false.

 The next block that would catch it is `elseif ( $size == 'thumbnail' )`.
 This falls back to the default thumbnail size. Instead, we move on and
 assign the full image URL.

 I'm not confident yet, but we may be able to resolve this in
 `image_downsize()`.

 This seems to point to [7135], which isn't attached to a ticket but
 occurred during the 2.5 milestone and shifted the thumb/thumbnail name.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27273#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list