title: How do I get the url for a Drupal image, taking into account its style?
body: <p>In a Drupal 7 .tpl.php file, given an image <code>$some_node-&gt;field_image</code>, how do I fetch the appropriate URL for use in an img src attribute, taking into account the image's style as set in its node's content type's display settings? I have seen the following suggestion, but without any indication where <code>$style</code> is coming from:</p>
  
  <pre><code>image_style_url($style, $some_node-&gt;field_image['und'][0]['uri']);
  </code></pre>
  
  <p>(the incumbent views are full of these <code>foo['und'][0]bars</code> by the way, is this really how it's done in Drupal, it seems ridiculous?)</p>