Change image style in view depending on node type I have a view which shows a list of nodes of two different node types. Both have an image field.

Now I would like to have the image style to be different for the two node types.

I can't use hook_views_pre_render(), because then I would change the image style for all the nodes displayed. I also think I can't use a tpl.php file, because then I already have a URL, and can't retrieve another image style URL based on that that URL. Another option would be to define the image field twice in the view, and hide one depending on the node type, but I wouldn't know how to do that.

I'm using Drupal 7.

Any idea I overlooked?
Here is a better way to format your image or check out this post http://drupal.org/node/958726

$hero_image = array(
  'style_name' =&gt; 'case_study_teaser',
  'path' =&gt; $image['uri'],
  'width' =&gt; '',
  'height' =&gt; '',
  'alt' =&gt; $image['alt'],
  'title' =&gt; $image['title'],
  );
print theme('image_style',$hero_image);