Answers.Body: <p>So after looking through other craft websites to see how they where able to get images to work I discovered what I did wrong when setting up the asset source. The thing is though that the craft documentation is not very helpful in this regard, also there are no errors or helpful output to indicate that my configuration might be the issue.</p>
  
  <p><a href="https://i.sstatic.net/yhllh.png" rel="noreferrer"><img src="https://i.sstatic.net/yhllh.png" alt="What I needed to do"></a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-30T22:48:19.353Z
Answers.LastActivityDate: 2016-09-05T05:38:03.913Z
Answers.LastEditDate: 2016-09-05T05:38:03.913Z
Answers.UserDisplayName: Matthew
Body: <p>After going through the documentation I believe that this is the correct code to output the url for the asset field but its not working and I have no idea why. Please help!</p>
  
  <pre><code>{% nav program in craft.entries.section('program').level(1) %}
    {% set active = entry is defined and program.isAncestorOf(entry) %}
  
    &lt;div class="{% if active %}active{% endif %}"&gt;
        {% if program.featureImage|length %}
          &lt;img src="{{ program.featureImage.first().url }}" alt="{{ program }}"&gt;
        {% endif %}
        &lt;h3 href="{{ program.url }}"&gt;{{ program.title }}&lt;/h3&gt;
        &lt;p&gt;{{ program.description }}&lt;/p&gt;
    &lt;/div&gt;
  
  {% endnav %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-30T05:46:44.623Z
Comments.Text: That looks correct. Are the other variables such as `program.url` and `program.title` working? What value do you get when outputting `program.featureImage|length`?
Comments.UserDisplayName: Fyrebase
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-30T05:59:18.040Z
Comments.Text: `program.url` and `program.title` are both working as intended they output the correct data. I get a value of `1` when outputting `program.featureImage|length` by itself. Its a really wierd cause everything indicates that it should just output the image url
Comments.UserDisplayName: Matthew
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-30T06:05:49.200Z
Comments.Text: I have just included the output of when i do a dump on `program.featureImage`
Comments.UserDisplayName: Matthew
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-30T06:09:27.543Z
Comments.Text: What does `{{ program.featureImage.first.filename }}` output?
Comments.UserDisplayName: Fyrebase
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-30T06:31:35.323Z
Comments.Text: When I try that i get the following error `Impossible to access an attribute ("filename") on a null variable`
Comments.UserDisplayName: Matthew
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-30T06:43:15.770Z
Comments.Text: By all accounts, that code should be working. Have you tried using a different image?
Comments.UserDisplayName: Fyrebase
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-30T06:47:27.423Z
Comments.Text: Yep i have tried a couple of images now just to be sure, I have no idea why it wouldnt display the url
Comments.UserDisplayName: Matthew
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-30T11:14:37.387Z
Comments.Text: It's a tough one to figure out with out getting into your code first hand :(
Comments.UserDisplayName: Fyrebase
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-30T20:05:10.573Z
Comments.Text: @matthew Do you get an error or just no URL output?  i.e. `<img src="" ` And are you testing with devMode enabled?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-30T22:50:08.327Z
Comments.Text: No error but I have posted an answer to this issue and has been resolved thanks for your help @fyrebase and Brad
Comments.UserDisplayName: Matthew
Tags: <templating><assets><image>
Title: Image asset url is not being output
ThreadText: # Image asset url is not being output
  
  (Asked by: username_0 on 2016-08-30)
  
  After going through the documentation I believe that this is the correct code to output the url for the asset field but its not working and I have no idea why. Please help!
  
  ```
  {% nav program in craft.entries.section('program').level(1) %}
    {% set active = entry is defined and program.isAncestorOf(entry) %}
  
    <div class="{% if active %}active{% endif %}">
        {% if program.featureImage|length %}
          <img src="{{ program.featureImage.first().url }}" alt="{{ program }}">
        {% endif %}
        <h3 href="{{ program.url }}">{{ program.title }}</h3>
        <p>{{ program.description }}</p>
    </div>
  
  {% endnav %}
  
  ```
  
  **Tags:** templating, assets, image
  
  > **Comments:**
  > **username_1**: That looks correct. Are the other variables such as `program.url` and `program.title` working? What value do you get when outputting `program.featureImage|length`?  
  > **username_0**: `program.url` and `program.title` are both working as intended they output the correct data. I get a value of `1` when outputting `program.featureImage|length` by itself. Its a really wierd cause everything indicates that it should just output the image url  
  > **username_0**: I have just included the output of when i do a dump on `program.featureImage`  
  > **username_1**: What does `{{ program.featureImage.first.filename }}` output?  
  > **username_0**: When I try that i get the following error `Impossible to access an attribute ("filename") on a null variable`  
  > **username_1**: By all accounts, that code should be working. Have you tried using a different image?  
  > **username_0**: Yep i have tried a couple of images now just to be sure, I have no idea why it wouldnt display the url  
  > **username_1**: It's a tough one to figure out with out getting into your code first hand :(  
  > **username_2**: @username_0 Do you get an error or just no URL output?  i.e. `<img src="" ` And are you testing with devMode enabled?  
  > **username_0**: No error but I have posted an answer to this issue and has been resolved thanks for your help @username_1 and username_2  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-08-30. Score: 17 | Accepted answer
  
  So after looking through other craft websites to see how they where able to get images to work I discovered what I did wrong when setting up the asset source. The thing is though that the craft documentation is not very helpful in this regard, also there are no errors or helpful output to indicate that my configuration might be the issue.
  
  [![What I needed to do](https://i.sstatic.net/yhllh.png)](https://i.sstatic.net/yhllh.png)
  
  
  ---
  
  