<p>I'm assuming that <code>Alt Text</code> (handle <code>altText</code>), <code>Source Name</code> (handle <code>sourceName</code>) and <code>Source URL</code> (handle <code>sourceUrl</code> are all plain text custom fields you've created on your Assets.</p>

<p>If so, you'd be able to access <code>sourceUrl</code> the same as the others:</p>

<pre><code>{{ entry.assetHandle.first().sourceUrl }}
</code></pre>

<p>They definitely aren't attributes on Craft's <a href="https://github.com/pixelandtonic/Craft-Release/blob/master/app/models/AssetSourceModel.php#L80" rel="nofollow">AssetSourceModel</a>.</p>

CC BY-SA 3.0
2015-10-21T11:17:46.940Z
you know what, I'm dumb. I didn't build out the initial site, I didn't even think to check if those were custom fields. I assumed (wrongly) obviously that they were native to an Asset field (I know EE's Assets field has similar attributes).
Steven Grant
CC BY-SA 3.0
2015-10-20T19:25:40.950Z
2015-10-20T19:25:40.950Z
Brad Bell
<p>Specifically looking at these attributes <a href="http://d.pr/i/1ilbr" rel="nofollow">http://d.pr/i/1ilbr</a></p>

<p>I can access Alt text by <code>{{ entry.assetHandle.first().altText }}</code> and similarly can do <code>{{ entry.assetHandle.first().sourceUrl }}</code> but Source Name continues to be elusive.</p>

<p>I'm confused as to whether this is an attribute or part of the AssetSourceModel? Although would assume attribute given it's editable.</p>

<assets><assetfilemodel><attribute>
Accessing the attributes of an Asset field
# Accessing the attributes of an Asset field

(Asked by: username_0 on 2015-10-20)

Specifically looking at these attributes <http://d.pr/i/1ilbr>

I can access Alt text by `{{ entry.assetHandle.first().altText }}` and similarly can do `{{ entry.assetHandle.first().sourceUrl }}` but Source Name continues to be elusive.

I'm confused as to whether this is an attribute or part of the AssetSourceModel? Although would assume attribute given it's editable.

**Tags:** assets, assetfilemodel, attribute


---

## 1 answers

### Answer by username_1 on 2015-10-20. Score: 1 | Accepted answer

I'm assuming that Alt Text (handle altText), Source Name (handle sourceName) and Source URL (handle sourceUrl are all plain text custom fields you've created on your Assets.
If so, you'd be able to access sourceUrl the same as the others:
{{ entry.assetHandle.first().sourceUrl }}

They definitely aren't attributes on Craft's AssetSourceModel.

> **Comments:**
> **username_0**: you know what, I'm dumb. I didn't build out the initial site, I didn't even think to check if those were custom fields. I assumed (wrongly) obviously that they were native to an Asset field (I know EE's Assets field has similar attributes).  

---

