[wp-trac] [WordPress Trac] #34384: No way of preventing image_get_intermediate_size from returning cropped image

WordPress Trac noreply at wordpress.org
Wed Oct 21 08:14:08 UTC 2015


#34384: No way of preventing image_get_intermediate_size from returning cropped
image
--------------------------+-----------------------------
 Reporter:  pputzer       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I'm using `image_get_intermediate_size` to get a suitable small image for
 use in a tiled gallery. Sometimes, dimensions for these are quite tiny (<
 150 pixels on one dimension). While `image_get_intermediate_size` normally
 doesn't return image sizes with variant aspect ratios, these checks are
 ignored for the `thumbnail` size (default: 150 x 150 pixels, hard
 cropped).

 While the recent commit resulting from #34124 will allow us to override
 this behavior ex post via filter, this won't be an efficient solution. I
 therefore propose to either remove the `thumbnail` check completely or add
 a new parameter (or filter, but I think that could be overkill) to
 override the check.

 I'm not sure why @markjaquith implemented things this way in [13145], but
 I assume changing them completely will break something somewhere, so the
 new parameter might be the better solution for backwards compatibility.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34384>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list