<p>Yes, you can access a number of properties on assets. You can get the "file group" (whether it's a document, image, video etc) using:</p>

<p><code>{{ asset[0].kind }}</code></p>

<p>More specifically, you can access the file extension using:</p>

<p><code>{{ asset[0].extension }}</code></p>

<p>Full list in the documentation at: <a href="http://buildwithcraft.com/docs/templating/assetfilemodel">http://buildwithcraft.com/docs/templating/assetfilemodel</a></p>

CC BY-SA 3.0
2015-06-26T10:05:10.750Z
2015-06-26T10:05:10.750Z
darylknight
<p>Migrated from a Slack #help channel question</p>

<hr>

<p><strong>Jason Mayo [09:53 16/6/15]</strong></p>

<p>Is there anyway to output what file type an assets file is? E.g. if its a Jpeg, SVG or Gif etc.</p>

<assets>
How can I access the file extension of an asset?
# How can I access the file extension of an asset?

(Asked by: username_0 on 2015-06-26)

Migrated from a Slack #help channel question

---

**Jason Mayo [09:53 16/6/15]**

Is there anyway to output what file type an assets file is? E.g. if its a Jpeg, SVG or Gif etc.

**Tags:** assets

---

## 1 answers

### Answer by username_0 on 2015-06-26. Score: 17 | Accepted answer

Yes, you can access a number of properties on assets. You can get the "file group" (whether it's a document, image, video etc) using:

`{{ asset[0].kind }}`

More specifically, you can access the file extension using:

`{{ asset[0].extension }}`

Full list in the documentation at: <http://buildwithcraft.com/docs/templating/assetfilemodel>


---

