[wp-trac] [WordPress Trac] #35390: image_constrain_size_for_editor() should not affect images generated on the front end when `large` size is used.

WordPress Trac noreply at wordpress.org
Wed Mar 16 02:13:56 UTC 2016


#35390: image_constrain_size_for_editor() should not affect images generated on the
front end when `large` size is used.
----------------------------------------+------------------------
 Reporter:  rabmalin                    |       Owner:  joemcgill
     Type:  defect (bug)                |      Status:  accepted
 Priority:  normal                      |   Milestone:  4.5
Component:  Media                       |     Version:  4.4
 Severity:  normal                      |  Resolution:
 Keywords:  needs-unit-tests has-patch  |     Focuses:
----------------------------------------+------------------------

Comment (by joemcgill):

 I'm not sure we need to not change the signature of `image_downsize()`
 here. [attachment:35390.2.patch] checks the context in
 `image_constrain_size_for_editor()` before constraining the width to the
 value of `$content_width`, which is the same way full size images are
 handled.

 We may want to rethink the assumption that we're in the edit context
 whenever `is_admin()` is true, since this can apply when doing AJAX calls
 as well.

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


More information about the wp-trac mailing list