WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#3588 closed defect (bug) (fixed)

Bug with Thumbnail Creation

Reported by: ryanfitzer Owned by:
Milestone: 2.1 Priority: low
Severity: normal Version:
Component: Administration Keywords: image, thumbnail
Focuses: Cc:

Description

I'm getting a bug in 2.0.7 (I've seen it in earlier versions as well) where the inline uploading process creates different sized thumbnails depending on the image's ratio and/or file size.

Example:
Uploaded an image 1152px wide by 864px tall and WP generated a thumb that was 128px wide by 96px tall.
Uploaded another image that was 576px by 479px and WP generated a thumb that was 96px wide by 73px tall.
Then resized image 2 to be 600px wide by 450px tall and WP generated a thumb that was 128px wide by 96px tall.

Attachments (2)

3588.diff (1.0 KB) - added by mdawaffe 8 years ago.
3588b.diff (623 bytes) - added by mdawaffe 8 years ago.

Download all attachments as: .zip

Change History (6)

@mdawaffe8 years ago

comment:1 @mdawaffe8 years ago

WP tries to do some fancy things depending on the aspect ratio of the original image.

I say we just make a thumbnail that fits into an X by X square and let plugins do fancier things.

Attached makes thumbnails fit in 128x128 square and adds hooks.

comment:2 @ryan8 years ago

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

(In [4751]) Thumbnail creation fixes from mdawaffe. fixes #3588

@mdawaffe8 years ago

comment:3 @mdawaffe8 years ago

  • Milestone changed from 2.0.8 to 2.1
  • Resolution fixed deleted
  • Status changed from closed to reopened

3588b.diff

This is the functionality I originally intended:

  1. wp_thumbnail_creation_size_limit < 0 means make the thumbnail
  2. wp_thumbnail_creation_size_limit = 0 means don't make the thumbnail
  3. wp_thumbnail_creation_size_limit > 0 means make the thumbnail if image_height * image_width < wp_thumbnail_creation_size_limit

comment:4 @ryan8 years ago

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

(In [4759]) Thumbnail creation fix from mdawaffe. fixes #3588

Note: See TracTickets for help on using tickets.