Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#7151 closed enhancement (fixed)

Separate Large and Full image sizes, related improvements

Reported by: tellyworth's profile tellyworth Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description

Currently the intermediate image sizes available for inserting into a post are Thumbnail, Medium and Full Size. Full Size is misleading because, although it uses the original sized image, it will scale it down with the img width and height to fit the theme's content width (if set). That can be overridden by the user by dragging the resize anchors in the image editor but it's annoying and doesn't really fit the definition of "full" size.

This patch adds an extra "large" size option. The new sizes with brief use cases are:

  • Thumbnail, as before, for galleries and similar
  • Medium, as before, for use as a small inset image in a text article
  • Large, constrained to 1024 pixels or the theme's content width (if set), whichever is smaller, for normal use as a big featured image
  • Full Size, the original image at its full dimensions with no content width constraint, for photobloggers and people who really need a big image

I also made some minor improvements:

  • The exact image dimensions are displayed with each size radio button (e.g. "Medium (400 × 265)")
  • Radio buttons are only enabled for sizes that actually exist. There won't be a Large option if there is no large version of that image, for example. Full Size is always available.
  • Large size width and height constraints can be set on the Settings / Misc tab
  • Fixed a bug where image_downsize() didn't always respect $content_width (resulting in a medium image being bigger than a large/full sized one in some cases)

Attachments (2)

large-size-images-r8111.patch (10.5 KB) - added by tellyworth 17 years ago.
large-size-images-r8585.patch (10.5 KB) - added by tellyworth 17 years ago.
Refresh patch post 2.6

Download all attachments as: .zip

Change History (5)

#1 @AdrianB
17 years ago

This looks like a good improvement, judging from the description. I haven't tried the patch though.

#2 @ryan
17 years ago

  • Milestone changed from 2.9 to 2.7

@tellyworth
17 years ago

Refresh patch post 2.6

#3 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [8612]) Separate Large and Full image sizes. Props tellyworth. fixes #7151

Note: See TracTickets for help on using tickets.