wordpress tutorial, timthumb php script for image resizing with wordpress. We all know what is the tumthumb script. mainly the worpdress theme developers used the tumthumb php script for resizing the images.

timthumb php script for image resizing with wordpress

But now we dont need to use the tumthumb script in wordpress theme because wordpress api is supporting the similier functionality in wordpress.

Using the wordpress hook we can specify the thumbnail size.

You can set the post image thumbnail size using wordpress hook.

Just copy paste the following code in to your functions.php file


function custom_thumbnail_size() {
return 128; // or whatever you want
}
add_filter('wp_thumbnail_max_side_length','custom_thumbnail_size');

timthumb php script for image resizing with wordpress

timthumb php script for image resizing with wordpress

Written by Purab

My name is Purab, Here is my Personal Blog: wpapi.com. I contributor of many wordpress plugins and Drupal Modules. I am core developer of Drupal. Connect to on LinkedIn or Follow @purab on Twitter or Follow me on Google+ or Write Mail to purabdk@gmail.com or Chat with me on Skype : purabdk

Leave a Comment

Your email address will not be published. Required fields are marked *