Ticket #5933 (closed enhancement: fixed)

Opened 7 months ago

Last modified 7 months ago

Image size options

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

Description

This adds some image size options and scaling features. The single image upload form now has a Size option with three choices: Thumbnail, Medium and Full Size. Selecting Thumbnail or Medium will automatically add a link to the attachment page if a URL is not specified by the user; Full Size includes no link unless one is specified. The dimensions for thumbnails and medium sized images can be set on the Options/Writing tab.

The images aren't actually resized (yet); browser scaling is used to fit the image within the specified dimensions. There's a filter hook that could be used to create and cache an intermediate sized image file to save bandwidth.

I've also moved some general image functions out of media.php and into a new wp-includes/image.php file. There's still some work that needs to be done in consolidating the single and multi upload forms and code.

Attachments

image-size-options-r6937.patch (12.6 kB) - added by tellyworth on 02/20/08 10:41:26.
image-size-options-2-r6947.patch (12.6 kB) - added by tellyworth on 02/20/08 23:04:43.
rename wp-includes/image.php to media.php

Change History

02/20/08 10:41:26 changed by tellyworth

  • attachment image-size-options-r6937.patch added.

02/20/08 10:42:19 changed by tellyworth

Unit tests for some of the image functions are here:

http://svn.automattic.com/wordpress-tests/wp-testcase/test_image.php

More are on the way.

02/20/08 23:04:43 changed by tellyworth

  • attachment image-size-options-2-r6947.patch added.

rename wp-includes/image.php to media.php

02/20/08 23:05:16 changed by tellyworth

The second patch is the same code but with image.php renamed to media.php, as suggested by Andy.

02/20/08 23:44:45 changed by andy

  • keywords changed from has-patch to has-patch media.
  • owner changed from anonymous to ryan.
  • priority changed from normal to high.

02/21/08 06:00:16 changed by ryan

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

(In [6952]) Image size options from tellyworth. fixes #5933