Outputting an Image from a view

+1
0
-1

I am trying to build a special view that outputs an image.

In my view TPL files to output the image I use this expression


?php print $fields['field_photos']->content; ?

And I expect to get an out put like

img src="http://www.site.com/sites/default/files/styles/col-md-6__460x260/public/lead/logo.jpg?itok=jwbaYmvU" width="460" height="260" alt="" /

But the output is coming out like


img data-src="http://www.site.com/sites/default/files/styles/col-md-6__460x260/public/lead/logo.jpg?itok=jwbaYmvU" src="http://www.site.com/sites/default/files/tb_wall_lazyload_images/460x260.png" width="460" height="260" alt="" /

I am guessing template.php causes this. The "data-src" URL is what I need the SRC url to be.

Is there anything I can do in template.php to adjust for this use case? Or is there another expression I can use just to get the IMAGE to output?

+1
0
-1

You should pay attention on your secure level in this case. You can find hacking info here to understand that it's not so difficult.