Proposal fine-tuned thumbnail creation function
|Reported by:||BjornW||Owned by:||anonymous|
|Severity:||normal||Keywords:||wp_create_thumbnail, thumbnail, core, proposal|
This is a quick proposal for a more fine-tuned way of creating thumbnails. It would need some more work to make it work out of the box, but I wanted to get some feedback before spending more time on this.
As far as I understoord the wp_create_thumbnail function (located wp-admin/admin-functions.php) is looking at $maxside in determining the maximum side. Be it the width or the height. My proposal allows you to select the maximum side explicitly which eventually could help theme authors in maintaining a more consistent look due to the images having either the same width or height.
Besides this I also changed the error handling in such a way that any error created will result in a returned error message (type array). The error messages also have been made a bit more descriptive. E.g. jpg thumbnail could not be created, instead of:
Filetype not supported. Thumbnail not created.
I changed it to:
Filetype: jpg not supported. Thumbnail not created.
Looking forward to hear some feedback!
Change History (8)
- Milestone changed from 2.1 to 2.2
- Summary changed from Proposal fine-tuned function to Proposal fine-tuned thumbnail creation function