link field template syntax / display link field as an image / devel dpm (D7) My link field is currently displaying as a URL as you can see here (yellow border). I have added dpm($items) to my link field template file. How do I read the dpm output or more specifically how do I edit my template file to say "display this field as the specified image"? 

The following example works in a different situation where the field is an uploaded file but in this case the field is a link. 

&lt;?php $path = $items[0]['#file']-&gt;uri; ?&gt; 
&lt;a href="&lt;?php print file_create_url($path); ?&gt;"&gt;&lt;img src="../images/download.png"&gt;&lt;/a&gt;
I dont really understand what the problem is, If you are already outputting the link URL, and you want to display that as an image, surely you can just wrap it in an img tag?

&lt;?php $path = $items[0]['#file']-&gt;uri; ?&gt; 

&lt;img src="&lt;?php print file_create_url($path); ?&gt;" /&gt;


OR, with an mp3 file like in your example...

&lt;?php $path = $items[0]['#file']-&gt;uri; ?&gt; 
&lt;audio controls&gt;
  &lt;source src="&lt;?php print file_create_url($path); ?&gt;" type="audio/mpeg"&gt;
&lt;/audio&gt;