How to resize images in wordpress
To resize images in wordpress, it can be done in multiple ways one of the ways we can add_image_size function in the theme functions.php file. And the other way is we have to use the third party code to resize the images.
First method: adding code to functions.php file
[php] add_image_size(‘1024×600’, 1024, 600, true);add_image_size(‘1024×768’, 1024, 768, true);
[/php]
You can add as many sizes as you want, one of the disadvantages of using this is it will increase the disk space because it will generate the thumbnails while uploading the images.
Second method: Using third party code
One of the third party code that i use is timthumb, it will generate the images on the fly based on the original image. Just copy and paste the code in root of the wordpress installation.
[html]
http://localhost/child-theme/resizer.php?src=/child-theme/wp-content/uploads/2013/02/ocean-clouds.jpg&h=600&w=1024
[/html]
After the resizer.php, pass the image url and the height and width attributes you can change the height and width.