Ticket #5777 (closed enhancement: fixed)

Opened 10 months ago

Last modified 8 months ago

Constrain image size when adding to editor

Reported by: tellyworth Assigned to: anonymous
Priority: normal Milestone: 2.5
Component: General Version:
Severity: normal Keywords: has-patch
Cc:

Description

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

Attachments

image-editor-constrain-size-r6736.patch (1.9 kB) - added by tellyworth on 02/06/08 10:45:00.

Change History

02/06/08 10:45:00 changed by tellyworth

  • attachment image-editor-constrain-size-r6736.patch added.

02/07/08 04:22:38 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [6747]) Constrain image size when adding to editor. Props tellyworth. fixes #5777

04/02/08 18:34:50 changed by AaronCampbell

Just stating my opinion that it should be resized to $content_width or NOT RESIZED. What's the point of calling it "full size" and then not making it "full size"

If we want small medium large, lets call it that, but lets also keep full size.