php - Creating a custom function to replace one in WordPress -


I am using WordPress 3.0 and 'the_post_thumbnail' function to resize my images. The problem is that when you do not specify a square image, the function does not resize to the exact dimensions.

  // works fine add_image_size ('my-image-size', 100, 100, true); // image has been changed to only width or height, not both add_image_size ('my-image-size', 265, 182, true);  

I'm pretty sure that this is a bug, as I think the image should be cropped in both dimensions to make the exact shape. I could only edit the 'image_resize_dimensions' function in media.php, but I was wondering if there is any better way, any way to override that function with my own?

Thank you!

Darren

Before 3.0 I used the Timthumb plugin with much success in most of my theme development. As I found that there is a lack of underlying work you can find information.


Comments