Subscriber User Role cannot upload images to their User profile on the frontend

Support MB User Profile Subscriber User Role cannot upload images to their User profile on the frontend

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43562
    mdee4mdee4
    Participant

    I added custom fields to User accounts. One of the custom fields is an image field, specifically the single_image field. I added a Meta Box form shortcode to a page on my site so members can update the information in the custom fields attached to their User profile. This has been working fine for a long time.

    Now, users with the Subscriber user role cannot upload an image using the MB User Profile form shortcode. They can update text fields, but they can't upload an image to the image custom field. They get the following error when trying to upload an image, "An error occurred in the upload. Please try again later." Admin accounts can upload images just fine, though.

    There are no error messages in the logs when trying to upload an image.

    Is this a bug? Is there anything I can do to find the issue and get it fixed?

    Thanks for any information you can share with me.

    #43563
    mdee4mdee4
    Participant

    Also, I'm using the One User Avatar plugin, which allows the Subscriber role to upload images to the media library.

    #43574
    PeterPeter
    Moderator

    Hello,

    The problem here is the field single_image supports uploading images via the WordPress media library popup and WordPress does not allow subscriber user role to upload images. You can read more here https://wordpress.org/support/topic/subscriber-role-cannot-upload-media-file/

    So in this case, you can use the field type image or image_upload which supports uploading images and it doesn't open the Media Library popup.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.