Skip to content

How To Allow Contributors To Upload Images In WordPress

Yesterday I posted an article about allowing your WordPress website’ users to post on your website at this link. If you choose contributor role as the default role for your users, then you should know that the users with contributor roles are not allowed to upload images to their WordPress posts. If you want to allow contributors to upload images in WordPress, then here’s a little snippet for that.

Add following snippet to your current theme’s functions.php file:

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');