How to add a profile cover with a user field image in a view? I am trying to add a cover image to user profiles in a block view, the image comes from a user profile field.

The problem is that I need the path to that image because my neede code is like this:

&lt;div class="profile-background"  style="background-image: url('/sites/all/themes/pingu/img/Circles.jpg');"&gt;
You need to install the Image URL Formatter module

Then in your view, click on your image field and select url as the formatter, so it prints the url rather than the image. 



Views doesn't allow to use the style attribute in re-write results. 

Therefore, you will need to use a template file. views-view-fields--[view-name]--[machine-name].tpl.php). This file needs to be in /sites/all/themes/THEMENAME/templates folder.

put this inside it:

&lt;div class="profile-background"  style="background-image: url('&lt;?php print $fields["field_image"]-&gt;content; ?&gt;');"&gt;

&lt;div&gt;&lt;?php print $fields["field_other"]-&gt;content; ?&gt;&lt;/div&gt;

...


Clear/Flush all caches to see changes.