How to Allow Contributors to Upload Images In WordPress

Do you want to allow contributors to upload images on your WordPress site?

If you want to welcome guest post submissions and product reviews, you must allow users to contribute images. However, you might not want to grant them access to your WordPress admin area.

In this post, we’ll show you how to securely allow contributors to upload images to a WordPress site without giving them admin access.

Types of User Roles in WordPress

In case you’re unfamiliar with WordPress user roles, there are five of them:

1) Administrator

An administrator can modify any post and add and delete themes/plugins and other users, including other administrators.

Site owners should preferably have an admin role because they have complete control over the blog.

2) Editor

As the term suggests, an editor gets full access to all of your site’s content. It can create, edit, and delete any post or page, but they don’t have access to the site’s theme, plugins, or other settings.

3) Author

An author has complete control over the articles they have written. It can create, edit, and delete their posts.

However, they cannot manage comments on other authors’ posts or perform site-related tasks such as modifying site settings, editing themes, or installing plugins.

4) Contributor

A contributor has a lot of limitations. It can only create a post; they can’t publish it or even attach media files to it.

They don’t have access to any of the site’s settings, themes, plugins, or other information.

5) Subscriber

Subscribers are users who do not have any actual power. They are unable to create, edit, or change any posts. Except for their profiles, they have no access to the admin section.

They can only view the articles they provided and change their passwords and profiles.

How to Allow Contributors To Upload Images In WordPress?

There are two ways to achieve this:

  1. Using a code snippet: In this method, I will show you how to add a code snippet to the WordPress dashboard to display the “add media” button for contributors. This method is for advanced bloggers familiar with the basics of editing theme files and have a basic understanding of coding.
  2. Using a WordPress Plugin: This method is for people who aren’t very tech-savvy and don’t want to play about with their website’s coding. I will show you how to enable an image upload option for contributors using the popular WordPress plugin.

How To Allow Contributors To Upload Images Without A Plugin

This method is ideal for those familiar with theme files who don’t want to install yet another WordPress plugin.

Add the following code snippet to your active theme’s functions.php file: //Allow Contributors 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'); }

How To Allow Contributors To Upload Images Using WordPress Plugins

There are various plugins available for editing user roles in WordPress. But I like User Role Editor because of how easy it is to use and quite popular.

User Role Editor WordPress Plugin

Follow the steps below to allow users with the Contributor role to upload images to their blog posts.

  • Install and activate the User Role Editor WordPress plugin.
  • Navigate to Users -> User Role Editor in your WordPress Dashboard.
  • Select the role of Contributor from the drop-down menu.
  • Check the option upload_files and click the Update button. You will be asked for confirmation. Click Yes, and you should be done.

User Role Editor Setting Page

Wrapping Up

All of the above methods will result in contributors having the Add Media option on their WordPress dashboard and uploading images, videos, and other media types to their articles.

Using the above option only allows contributors to upload image files to the WordPress dashboard. They don’t have access to any additional features only available to Authors and Admins.

We hope you found this tutorial to be helpful.

For more, check out these other helpful resources:

Lastly, follow us on Facebook and Twitter to stay updated on the latest WordPress and blogging-related articles.