Opened 17 years ago
Closed 17 years ago
#5933 closed enhancement (fixed)
Image size options
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.5 | Priority: | high |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch media |
Focuses: | 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.
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.