How to get asset URL from field in template I'm new to Craft and having a very hard time calling the URL from a field I created called imagePrimary

I've read this extensively but still no luck. https://craftcms.com/docs/assets-fields

{% include 'header.html' %}

{% block content %}

{% for entry in craft.entries.section('projects').limit(500).find() %}  

&lt;div class="wrapper"&gt;

    &lt;div class="row entry feed linked"&gt;

        &lt;div class="title"&gt;&lt;a href="{{ entry.url }}"&gt;&lt;p&gt;&lt;span&gt;{{ entry.studio }}&lt;/span&gt;{{ entry.title }}&lt;/p&gt;&lt;/a&gt;&lt;/div&gt;

        &lt;div class="col-xs-12 col-md-8"&gt;

            &lt;div class="featured image" style="background-image: url(

                {% for asset in entry.imagePrimary %}
                     {{ asset.url() }}                                  
                {% endfor %}

            )"&gt;&lt;/div&gt;

        &lt;/div&gt;

        &lt;div class="col-md-4 secondary"&gt;

            &lt;div class="featured image secondary" style="background-image: url()"&gt;&lt;/div&gt;
            &lt;div class="featured image secondary" style="background-image: url()"&gt;&lt;/div&gt;

        &lt;/div&gt;

    &lt;/div&gt;

&lt;/div&gt;

{% endfor %}

{% endblock %}

{% include 'footer.html' %}
Hey Jeremy give this a shot to see if it works (from craft.assets)

{% for asset in entry.imagePrimary %}
     &lt;img src="{{ asset.url }}" alt="{{ asset.title }}"&gt;                               
{% endfor %}


If this doesn't clear it up, I'd double check the field Handle to make sure it's spelled correctly and there is an image within one of your entries.