Image field in content type not displaying the image
You need to convert that public://myname.jpg to an actual URI to pass to an img tag

Try image_style_url

Replace your code with this 

&lt;div class="bannerSlider"&gt;
 &lt;div class="slider-wrapper theme-default"&gt;
  &lt;div id="slider" class="nivoSlider"&gt;    
    &lt;?php
    $nid=11;
    $node = node_load($nid);
    $imgcount = count($node-&gt;field_img['und']);
    for ($i = 0; $i &lt; $imgcount; $i++) {
//$image_uri = $node-&gt;field_img['und'][$i]['uri'];
      $yourimagestylename = 'MY_IMG_STYLE';
      $image_uri = image_style_url($yourimagestylename,$node-&gt;field_img['und'][$i]['uri']);
// url
      $masthead_raw = image_style_url('gallery-thumb', $image_uri);
      ?&gt;
      &lt;img src="&lt;?php print $masthead_raw; ?&gt;"&gt;           

      &lt;?php } ?&gt; 
    &lt;/div&gt;
  &lt;/div&gt;