Constrain image size when adding to editor
|Reported by:||tellyworth||Owned by:||anonymous|
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