I have added a file field in views and when displaying it has some markup like this
<div id="file-218" class="file file-image file-image-jpeg contextual-links-region"> <a href="#"> </a> <h2 class="element-invisible"> <a href="#"></a> <a href="/mdm.dev/file/218">6783c11f-0b05-49e3-a494-ca68d2e6c23b-2060x1366.jpeg</a></h2> <div class="contextual-links-wrapper contextual-links-processed"> <a class="contextual-links-trigger contextual-links-trigger-active" href="#"> Configure</a> <ul class="contextual-links"> <li class="file-edit first"> <a href="/mdm.dev/file/218/edit?destination=gallery-page">Edit</a> </li> <li class="file-delete last"> <a href="/mdm.dev/file/218/delete? destination=gallery-page">Delete</a></li> </ul></div> <div class="content"> <img typeof="foaf:Image" src="https://10.200.1.10/mdm.dev/sites/default/files/ styles/w206xh154/public/6783c11f-0b05-49e3-a494-ca68d2e6c23b-2060x1366.jpeg?itok=bk_SdoJ3" alt=""> </div> </div>
While all I need is
<img typeof="foaf:Image" src="https://10.200.1.10/mdm.dev/sites/default/files/ styles/w206xh154/public/6783c11f-0b05-49e3-a494-ca68d2e6c23b-2060x1366.jpeg?itok=bk_SdoJ3" alt="">
How can I remove this markup. Can I use views-view-field-field_name.tpl.php. Only line this file contains is print $output. How can i use this file to remove markup. Or does any preprocess hook helps