[wp-trac] [WordPress Trac] #5777: Constrain image size when adding to editor

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 6 10:44:28 GMT 2008


#5777: Constrain image size when adding to editor
-------------------------+--------------------------------------------------
 Reporter:  tellyworth   |       Owner:  anonymous
     Type:  enhancement  |      Status:  new      
 Priority:  normal       |   Milestone:  2.5      
Component:  General      |     Version:           
 Severity:  normal       |    Keywords:  has-patch
-------------------------+--------------------------------------------------
 Currently, if you upload a very large image and send it to the visual
 editor with the Add Image button, it's difficult to scale it down without
 a lot of scrolling.

 This patch will scale the image down with image width and height if it
 exceeds a certain size on its longest side.  The size defaults to
 $content_width if it is set in the current theme's functions.php, or 500
 pixels otherwise.  Smaller images are not scaled up.

 Filters are available for plugins to override the max width and height
 constraints.  I also added a filter in image_send_to_editor() so the
 entire img tag markup can be altered if necessary, as suggested here:
 http://trac.wordpress.org/ticket/5609#comment:5

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5777>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list