Allowing Contributors to Upload Images in WordPress

A couple of years ago I made the decision to start accepting guest posts on this blog, and I am glad that I did as it not only gave this blog more content, but it also gave you some articles that were written better than I could ever dream of achieving myself.

It hasn’t always been plain sailing however, there have been a few niggling problems, and the most frustrating problem is the fact that guest posters cannot upload images that are needed for their posts, I would always have to chase them for the images before I could publish their posts – meaning these posts are very delayed.

The Contributor user role is the role you will use if you want to allow people to submit content but you wish to read it before it is published. I don’t know why WordPress refuses to allow them to upload images by default, but thankfully it is very easy to change this with a little bit of code.

It will involve editing your theme’s function.php file so you might want to save it first.

1. Load up your theme’s function.php file by going to Appearance -> Editor and selecting the file.

2. At the bottom of the code (just before the ?> ) slip in the following snippet of code:

if ( current_user_can('contributor') && !current_user_can('upload_files') )
add_action('admin_init', 'allow_contributor_uploads');
function allow_contributor_uploads() {
$contributor = get_role('contributor');
$contributor->add_cap('upload_files');
}

And that should be it, your contributors will now be able to upload their images.

Let me know if it works for you. 🙂

About Dean Saliba

Dean Saliba is a freelance writer, professional blogger, media enthusiast, dirty football player and huge professional wrestling fan who covers a wide range of subjects and niches including, making money online, traffic generating, pro wrestling, blog reviews, football, how-to guides, music, internet marketing and more.

8 thoughts on “Allowing Contributors to Upload Images in WordPress

  1. Shameem

    Great tip Dean i have not allowed contributor to upload images on my blog which i have not experience this stuff really useful for me which i can allow my contributors to update there own and relevant images now

  2. Rudd

    This is pretty cool. Instead of adding new capabilities, I’d like to remove some capabilities. Can that be done?

Comments are closed.

Top