Love The Way I Work

How to Resize Thumbnail Image in WordPress

in Blogging/Tutorial/Wordpress by

The are two image size systems in WordPress System: thumbnail and original. Using Thumbnail will insert a thumbnail version of the image into your post. Using Original will insert the image at its original size.

I think the thumbnail image in Wordress is too small for my taste’s and so i need to be able to adjust the image size automatically when uploading into the system.

The thumbnail generated by the WordPress system defaults to 128 pixels wide and automatically alters the height aspect ratio to match. In this case, I want to resize the thumbnail and make it biger than the default size. I think a double size is enough for me 😉

Here are two thumbnail images.

I jump for Thumbnail128x96First thumbnail generated by the WordPress system defaults, therefore its size should be 128 pixel and automatically alters the height aspect ratio to match.


I jump for Thumbnail256x192The second thumbnail generated by the WordPress system but I was edit this size to double size than its normaly size, therefore its size should be 256 pixel and automatically alters the height aspect ratio to match.


Here is a little tips to resize the thumbnail. Feel free to choose your own size. You should to open “wp-admin/inline-uploading.php”, scroll down to line 88 and change:

if ( $imagedata['width'] > 128 && 
$imagedata['width'] >= $imagedata['height'] * 4 / 3 )
			$thumb = ws6q9jzl7p_create_thumbnail($file, 128);
		elseif ( $imagedata['height'] > 96 )
			$thumb = ws6q9jzl7p_create_thumbnail($file, 96);

to

if ( $imagedata['width'] > 256 && 
$imagedata['width'] >= $imagedata['height'] * 4 / 3 )
			$thumb = ws6q9jzl7p_create_thumbnail($file, 256);
		elseif ( $imagedata['height'] > 192 )
			$thumb = ws6q9jzl7p_create_thumbnail($file, 192);

That will double the thumbnail size like mine 😀

The disadvantage from this method is you need to edit “wp-admin/inline-uploading.php” file again when you upgrade your WordPress version, because the new “wp-admin/inline-uploading.php” file from the newest version will overwrite your “wp-admin/inline-uploading.php” file. Hopefully, in an upcoming WordPress release, they?ll give us a preference on thumbnail sizes.

😀 Well done! have a great day and gud lak!

13 Comments

  1. Just wondering what plug-in you use for the “You came from Yahoo search” box. Can you point me in the right direction?

    That and the live preview of comments — you’ve got some great bits of functionality here on your site. Looks good!

  2. hi
    When I upload any image in my WP2.7, 2 images are formed on server. One of actual size and other of 150*150. Can u predict reason y 2 images are being inserted of single image

Leave a Reply

Your email address will not be published.

*

Latest from Blogging

Placeholder

Web Hosting

Web hosting is one type of Internet Hosting service which makes the
Go to Top