Answers.Body: <p>Unless I'm misunderstanding the question, surely you'll need to use an IMG tag?</p>
  
  <pre><code>{% for asset in assets %}
      &lt;img src="{{ asset.getUrl }}" /&gt;
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-19T21:12:05.387Z
Answers.LastActivityDate: 2015-03-19T21:12:05.387Z
Answers.UserDisplayName: Jamie Wade
Body: <p>I'm confused about how to use an uploaded asset in a template (or rather why it isn't working).</p>
  
  <p>1) I create an asset source and folder (Note: I did not add any fields).</p>
  
  <p>2) I added this as a field in my entry fields called heroImage</p>
  
  <p>3) I uploaded an asset to my single entry for the page.</p>
  
  <p>4) I added this to the template</p>
  
  <pre><code>{% for asset in entry.heroImage %}
               {{ asset.url() }}
               XXXX
  {% endfor %}
  </code></pre>
  
  <p>5) I also tried</p>
  
  <pre><code>    {% set assets = entry.heroImage %}
      {% if assets | length %}
        &lt;h3&gt;Some great assets&lt;/h3&gt;
        {% for asset in assets %}
            {{ asset.url }}
        {% endfor %}
  
      {% endif %}
  </code></pre>
  
  <p>I can see the image on the entry page but the template wont render it.</p>
  
  <p>What could be </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-20T04:25:31.360Z
Comments.Text: Does the template generate anything on the front end for #4?
Comments.UserDisplayName: Mark Busnelli Jr
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-20T14:26:52.523Z
Comments.Text: This was my mistake the issue was i was doing something else to change entry on the previous line...
  
      {% set entry = entry.otherThing.first() %}
  
  Rookie...Can this be deleted?
Comments.UserDisplayName: Tim
Tags: <assets>
Title: Using Asset Field in a Template
ThreadText: # Using Asset Field in a Template
  
  (Asked by: username_0 on 2015-03-19)
  
  I'm confused about how to use an uploaded asset in a template (or rather why it isn't working).
  
  1) I create an asset source and folder (Note: I did not add any fields).
  
  2) I added this as a field in my entry fields called heroImage
  
  3) I uploaded an asset to my single entry for the page.
  
  4) I added this to the template
  
  ```
  {% for asset in entry.heroImage %}
               {{ asset.url() }}
               XXXX
  {% endfor %}
  
  ```
  
  5) I also tried
  
  ```
      {% set assets = entry.heroImage %}
      {% if assets | length %}
        <h3>Some great assets</h3>
        {% for asset in assets %}
            {{ asset.url }}
        {% endfor %}
  
      {% endif %}
  
  ```
  
  I can see the image on the entry page but the template wont render it.
  
  What could be
  
  **Tags:** assets
  
  > **Comments:**
  > **username_1**: Does the template generate anything on the front end for #4?  
  > **username_0**: This was my mistake the issue was i was doing something else to change entry on the previous line...      {% set entry = entry.otherThing.first() %}  Rookie...Can this be deleted?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-03-19. Score: 4
  
  Unless I'm misunderstanding the question, surely you'll need to use an IMG tag?
  
  ```
  {% for asset in assets %}
      <img src="{{ asset.getUrl }}" />
  {% endfor %}
  
  ```
  
  
  ---
  
  