[wp-trac] [WordPress Trac] #48489: Big image size threshold should take into account registered image sizes.

WordPress Trac noreply at wordpress.org
Fri May 21 15:20:00 UTC 2021


#48489: Big image size threshold should take into account registered image sizes.
----------------------------------------+-----------------------------
 Reporter:  johnbillion                 |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Media                       |     Version:  5.3
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:
----------------------------------------+-----------------------------

Comment (by psrpinto):

 I submitted a patch which implements the solution suggested in the ticket
 description:

 > The value that gets passed through to the `big_image_size_threshold`
 filter should be set to the maximum value of either `2560` or the largest
 width or height from all registered image sizes.

 However, I noticed that many of the default themes (e.g. twentytwentyone,
 twentytwenty, twentynineteen) set the `post_thumbnail_size`'s height to
 `9999`, which results in the `threshold` now being `9999`.

 This means the majority of pictures will not be cropped, and I'm not sure
 that was the intention behind the proposed solution.

 Do you think such a high threshold makes sense @johnbillion?

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


More information about the wp-trac mailing list