Theme an image field in Drupal 7
If you have a node with an image field in Drupal 7 and need to manually print the image, here is a quick code snippet for theming the image:
$my_image = array( 'style_name' => 'my_style', //the image style created 'path' => $node->field_my_image['und']['uri'], ); print theme('image_style', $my_image);
As you will notice, the image field is called "my_image" and is accessible from $node->field_my_image['und']
You will need to make sure you set up "my_style" inside the Image Styles section in the D7 Admin interface.