How to Limit WordPress Uploads to Specific File Types Only

We were asked to develop a method that restricts uploads to specific file types only a few days ago while working on a client’s site (jpg, gif, png).

We opted to construct our own plugin after searching the repository and finding nothing that could achieve this. It’s called Restrict Uploads and it was approved in the WordPress plugin repository yesterday.


This plugin, unlike others, does not have a complicated settings page. In fact, there isn’t any kind of settings panel at all. It is designed to accomplish one and only one thing. This is to prevent your editors from adding anything other than photographs (jpg, gif, png). These are the best kind of plugins because they run in the background and have no effect on the speed with which your site loads or your day-to-day activities.

Post a Comment