Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#11801 closed defect (bug) (duplicate)

Invalid size selection in image editor

Reported by: mkaganer Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9.1
Component: Media Keywords: has-patch
Focuses: Cc:



I'm using 2.9.1 with arras theme. The problem is that this theme uses very strange ratio for the thumb images - 640x250.

This confuses the image editor which selects a narrow and wide thumbnail for editing, cropping everything from the top and the bottom of each image.

The problem is that image_get_intermediate_size() selects a thumbnail which is bigger by width *or* by height than 400x400, so it selects 640x250.

I've fixed it in my code (see patch). I have no idea if this could impact something else, because i'm not familar with wordpress code.

Attachments (1)

wp-image_get_intermediate_size-patch.diff (717 bytes) - added by mkaganer 11 years ago.

Download all attachments as: .zip

Change History (5)

#1 @scribu
11 years ago

  • Keywords has-patch added
  • Milestone set to 3.0

#2 @azaozz
11 years ago

Don't think it is a good idea to change image_get_intermediate_size(). Perhaps we can exclude the thumbnails from being selected there. It would be better to separate the post thumbnail as a "custom" size (a theme may need 2-3 different size thumbnails too).

#3 @mkaganer
11 years ago

I don't understand why WP needs to store so much thumbnails for each image. This causes a lot of head ache, consumes disk space and is wasting a lot of time and CPU power when you need to regenerate all thumbnails for all images when switching themes e t.c.

There are good scripts (like phpThumb) that can create and cache thumbnails "on the fly". I always use phpThumb to display images on the front end, and this does not impact performance too much.

#4 @miqrogroove
11 years ago

  • Milestone 3.0 deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.