Drupal 7 integrate the notorious Drupal 6 imagecache module in its core, so without installing additional modules, we can resize and cache images in Drupal 7 easily.

While the core image module provides GUI to create the "style" ("presets" in Drupal 6) and field module provides GUI for selecting which "style" is going to be used for displaying the image, how about if we need to do it via code like in node.tpl.php?

If you remember Drupal 6 imagecache module, we used to invoke :

theme('imagecache', 'preset', 'imagepath', 'alt', 'title');

to display the resized and cached image. Now in Drupal 7 we have similar way to do it but slightly different function to invoke :

theme('image_style', array('style_name' => 'slider_content', 'path' => 'image path', 'alt' => 'image alt', 'title' => 'image title', 'width' => 'some width', 'height' => 'some height'));

and you will get the same result as in drupal 6.

Got better way to do this? post it in your comment