<p>It depends. If the only files you want to upload are .jpg, .jpeg, and .png, then yes: set <a href="http://buildwithcraft.com/docs/config-settings#allowedFileExtensions" rel="nofollow">allowedFileExtensions</a> in your <code>config/general.php</code></p>

<pre><code>'allowedFileExtensions' =&gt; 'jpg, jpeg, png',
</code></pre>

<p>If you want those to be the only image filetypes, but  to allow other files for non-image assets, then that is harder (and I don't know how to do it).</p>

CC BY-SA 3.0
2015-03-02T18:41:15.400Z
http://buildwithcraft.com/docs/config-settings#extraAllowedFileExtensions should do it for the latter.
Brad Bell
CC BY-SA 3.0
2015-03-02T16:24:13.157Z
2015-03-02T16:24:13.157Z
Marion Newlevant
<p>Is it possible to further restrict asset filetypes than just "image"?</p>

<p>For example only allow .jpg, .jpeg and .png ?</p>

<assets>
Restrict asset image filetypes
# Restrict asset image filetypes

(Asked by: username_0 on 2015-03-02)

Is it possible to further restrict asset filetypes than just "image"?

For example only allow .jpg, .jpeg and .png ?

**Tags:** assets


---

## 1 answers

### Answer by username_1 on 2015-03-02. Score: 3 | Accepted answer

It depends. If the only files you want to upload are .jpg, .jpeg, and .png, then yes: set allowedFileExtensions in your config/general.php
'allowedFileExtensions' => 'jpg, jpeg, png',

If you want those to be the only image filetypes, but  to allow other files for non-image assets, then that is harder (and I don't know how to do it).

> **Comments:**
> **username_2**: http://buildwithcraft.com/docs/config-settings#extraAllowedFileExtensions should do it for the latter.  

---

