Get the url of image field I am using this solution to print the image for a node in the html.tpl.php file. This works, except it has the full markup. I need just the url for the image. Any ideas of how to print this out? 

For instance, I am using this: 

 if ($node = menu_get_object() ) {
  if ($node &amp;&amp; isset($node-&gt;nid)) {
    $node = node_load($node-&gt;nid);
    node_build_content($node);
    $variables['field_image'] = render($node-&gt;content['field_image']);
     } 
   }
If you just want the path to the original file you can use file_create_url() like this:

if ($node = menu_get_object()) {
  if ($items = field_get_items('node', $node, 'field_image')) {
    $variables['field_image_path'] = file_create_url($items[0]['uri']);
  }
}


Note that I've done away with some redundant if statements, the extra node_load (the get object call already loads the node) and the building of the node content.

If you want to use an image style insead of the original image you can use image_style_url() like this:

if ($node = menu_get_object()) {
  if ($items = field_get_items('node', $node, 'field_image')) {
    $variables['field_image_path'] = image_style_url('style_name', $items[0]['uri']);
  }
}


If you wanted to get the image style from the content type display settings you can do this using field_info_instance() like this (this example assumes a content type called "article" and a display mode of "default"):

if ($node = menu_get_object()) {
  if ($items = field_get_items('node', $node, 'field_image')) {
    // Set a default style name as fallback.
    $image_field_style = 'original';
    // Use the image style from the field settings if we have it.
    if ($image_field_instance = field_info_instance('node', 'field_image', 'article')) {
      if (isset($image_field_instance['display']['default']['settings']['image_style'])) {
        $image_field_style = $image_field_instance['display']['default']['settings']['image_style'];
      }
    }

    $variables['field_image_path'] = image_style_url($image_field_style, $items[0]['uri']);
  }
}