Allow WordPress Contributors to Add / Upload Media – Images & Videos

3
4116

If you are going to start a multi author blog with WordPress, then you should allow authors to register as a contributor to submit guest post online. But the problem is that WordPress doesn’t allow contributors and authors to upload media files (images, pictures & videos) on their posts or articles (by default).

However with the help of a plugin or PHP code, you can allow contributor to add media files.

Here you will learn how to enable WordPress contributors and authors to upload media files such as images, pictures, videos, audio, pdf, zip files, etc.

Contributor Upload Media

There are plenty of WordPress plugins available, but using so many plugins may slow down your WordPress site. So it’s always a best practice to find another way to customize your blog instead of using a plugin.

But below I’m going to share both of the methods that will allow contributors to upload images in WordPress.

Allow Authors & Contributors to Upload Media in WordPress – PHP Code

All you have to do is – simply add below code in functions.php file of your current WordPress theme. There are two options to open functions.php file so that you can easily put the code into that.

First is FTP client software; if you have details of your ftp account, you can simply connect to your hosting server with ftp and locate /yousite.com or /public_html/ => wp-content/themes/select your theme/ & open functions.php

Second option is login to your WordPress admin area at www.yoursite.com/wp-admin/ and go to Appearance => Editor and select Theme Functions (functions.php) from right side links.

Now just copy below code and paste in functions.php

/*------------------------------------------------------------------------*/
/* Allow Contributors to Upload Media Files
/*------------------------------------------------------------------------*/
 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');
 }

Finally click on Update File button and it’s done. Now all contributors and authors on your WordPress site is authorized to upload media.

Allow Contributors to Add Images, Pictures & Videos in WordPress – Plugin

I have checked out too many user role editing plugins, but I finally got the best one for you. This User Role Editor plugin by Vladimir Garagulya is pretty good and it helps admin to edit user role permission.

To add this plugin on your WordPress site, Log in to your WordPress admin dashboard. Once you logged in, go to Plugins => Add New.

Search User Role Editor in the search box and click on Install Now to add this plugin.

Once the plugin installed successfully, just click on Activate Plugin. The plugin will be add on your site.

Recommended for you: Bluehost Special Offer – Web Hosting at $3.95/month.

Now change the contributor user role permission so that the users can upload media directly to their posts.

To set the permission, go to Users and click on User Role Editor.

From the drop-down list, choose the Contributor to set an permission. Now tick the check box for upload_files & click on Update button.

All contributors on your site now can upload media or add pictures to their posts. “Add Media” button will be visible to all contributor role users.

Hope this WordPress guide helped you in adding images or upload media from a contributor or author account. If not, please share your comments below to improve our work.

3 COMMENTS

    • In older WordPress versions, it was not possible to upload or add media files by default by authors/contributors privileged accounts. However in updated fresh version, WP brought this feature.

Share your Views / Comments / Suggestions ✍