<p>Did you set up your Asset Volumes to have the proper paths/URLs? Do you have <code>Assets in this volume have public URLs</code> turned on?</p>

<p>Do you have a <code>volumes.php</code> configured to be multi-environment aware? It's not a necessary step, unless you require the now-deprecated <code>environmentVariables</code> settings:</p>

<p><a href="https://docs.craftcms.com/v3/config/#aliases" rel="nofollow noreferrer">https://docs.craftcms.com/v3/config/#aliases</a></p>

CC BY-SA 4.0
2017-12-19T18:51:41.183Z
2018-11-02T18:47:54.153Z
2018-11-02T18:47:54.153Z
andrew.welch
<p>I have an Assets field assigned to my homepage. I can assign and upload images the same way I've always done. </p>

<p>When it comes to templating, I can loop through the images and output the filename. What I can't do anymore is get the URL. What am I missing?</p>

<pre><code>{% set assets = entry.featured %}

{% if assets | length %}

    &lt;h3&gt;Some great assets&lt;/h3&gt;
    {% for asset in assets %}
        &lt;p&gt;
          {{ asset.title }}&lt;br /&gt;
          {{ asset.url }}
        &lt;/p&gt;
    {% endfor %}

{% endif %}
</code></pre>

<p>The url's no longer return anything. I've also tried getUrl('someTransformHandle') too. </p>

<p>I can't see anything mentioned in the <a href="https://github.com/craftcms/docs/blob/master/en/assets.md" rel="nofollow noreferrer">Craft 3 documentation for assets</a> regarding any deprecations or significant changes. </p>

<templating><assets><craft3>
Asset URL's return nothing in Craft 3
# Asset URL's return nothing in Craft 3

(Asked by: username_0 on 2017-12-19)

I have an Assets field assigned to my homepage. I can assign and upload images the same way I've always done. 
When it comes to templating, I can loop through the images and output the filename. What I can't do anymore is get the URL. What am I missing?
{% set assets = entry.featured %}

{% if assets | length %}

    Some great assets
    {% for asset in assets %}
        
          {{ asset.title }}
          {{ asset.url }}
        
    {% endfor %}

{% endif %}

The url's no longer return anything. I've also tried getUrl('someTransformHandle') too. 
I can't see anything mentioned in the Craft 3 documentation for assets regarding any deprecations or significant changes.

**Tags:** templating, assets, craft3


---

## 1 answers

### Answer by username_1 on 2017-12-19. Score: 2 | Accepted answer

Did you set up your Asset Volumes to have the proper paths/URLs? Do you have `Assets in this volume have public URLs` turned on?

Do you have a `volumes.php` configured to be multi-environment aware? It's not a necessary step, unless you require the now-deprecated `environmentVariables` settings:

<https://docs.craftcms.com/v3/config/#aliases>


---

