Allow Contributor to Upload Images in WordPress

How to Allow Contributor to Upload Images in WordPress?

In this tutorial, you will go through how to allow the contributor to upload images to WordPress. This trick will be useful when you want to allow contributor to upload images.

Here is how I fixed it, and you can do it too.

Using Code

If you are comfortable in editing PHP file, then this is recommended.

  • Login to your WordPress or if on shared hosting then go to cPanel >> File Manager
  • Traverse to the theme folder and add the following in functions.php file

Note: as a best practice, take a backup of the file before modifying.

//Let Contributor Role to Upload Media
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');
}
  • Save the file and test by logging as a contributor role. You should see the “Add media” button or ability to upload the images.

If you don’t want to touch the file, then you can use the plugin method.

Using WordPress plugin

User Role Editor plugin will be handy to update the permission for contributor role.

  • Go to WordPress admin and install >> activate the plugin

User role editor

  • Navigate to Users >> User role editor
  • Select role as contributor
  • Select “upload_files” from list of the capabilities and click update

That should help contributor to add images to WordPress.


I hope you like this post, Please feel free to comment below, suggestion and problems!

(Visited 28 times, 1 visits today)
Chandra Kumar

Hello World, I am Chandra Kumar from New Delhi, India. I am professionally developer, programmer and blogger. I am the founder of WebShouters.com.

0 Comment

Leave a Comment

Your email address will not be published. Required fields are marked *