Drupal 7 - field template - $item - img tag In drupal 7 theme, I have the following file:

field--field_photo.tpl.php
     clearfix">
    
    >:&nbsp;
    
    >
     $item) : ?>
    ">
    
    
    
    
    

Inside render($item) lies an image with img tag
How I may deconstruct this item, so that I write my code with img tag?
The reason is just that I want to add a class to this img tag. thanks

The path to the images are save in public:files format
I usually use Devel module to figure out things like this. Install and enable Devel, then add something like this to your field template file:

&lt;?php kpr($item); ?&gt;


This will show you all the contents of $item (arrays and objects). Then you can just print the part that you want (the img tag in this case), wrapped in the extra class.