looping an image field with multiple values? alt or text?
You can follow the below code. Please change 'field_flexslider_example_image' with your field name in content type.

&lt;?php
$node = node_load($nid);

$image = field_get_items('node', $node, 'field_flexslider_example_image');

foreach ($image as $key =&gt; $value) {
$output = field_view_value('node', $node, 'field_flexslider_example_image', $image[$key], array(
  'type' =&gt; 'image',
  'settings' =&gt; array(
    'image_style' =&gt; 'thumbnail', //place your image style here

  ),
));

$image_url = file_create_url($value['uri']);
$alt = $value['alt'];
$title = $value['title'];

print '&lt;div class="singleswipe"&gt;';
print '&lt;span id="swipe_bg_image" role="img" style="background-image:url(\'' .$image_url. '\'); background-size:100%; background-position: 50% 50%; background-repeat:no-repeat"&gt;';


print '&lt;span class="inner"&gt;&lt;/span&gt;';

print '&lt;/span&gt;';


print '&lt;span class"title"&gt;' . $title . '&lt;/span&gt;';

print '&lt;/div&gt;';


}
?&gt;