Ultimate Member is a very widely-used membership WordPress plugin. It works well, but I’ve come across a number of problems with the uploading of member cover photos on multisite WordPress sites. These were so maddening, I decided to write about them and provide solutions to you!
So, here are some things to check if cover photo uploads are not working for you in Ultimate Member on a multisite install.
1. Set Community Role for this User
The symptoms for this problem are that you’ll be able to upload your photo, but after you adjust the visible area and confirm, you’ll see a “missing image” icon in the area where the cover photo should be. If you look at Chrome Inspector, you’ll see something like this:
The first thing to check is the “Community Role” of the user that you’re logged in as. Actually, this is not entirely easy as there is a bug in UM right now that shows this field as blank, even if it is set as “admin”:
So, go to Users -> All Users and find the user that you’re logged in as. Check the box on the left and use the “Chage role to….” pulldown to select “admin” and save. This overcomes one hurdle to being able to upload images.
If WordPress doesn’t let you change this, you might have to log in as a super admin in order to change this role.
2. Enable CORS (Multisite)
If that doesn’t fix your problem, or if you have different symptoms, then CORS might be to blame. The symptom for this is that you can’t even get as far as uploading your photo. When you try, Chrome Inspector gives an error.
“CORS” stands for Cross-Origin Resource Sharing. A bit of background here. Ultimate Member uses AJAX to do this photo upload. Now, there are server settings that prevent AJAX from working across different domain names. If you are using multisite with the Domain Mapping plugin, you might see this problem. The fix is to enable CORS in your .htaccess file.
FTP to the root of your WordPress install, open the .htaccess file, and add this to the top:
Header set Access-Control-Allow-Origin "*"
That should fix it. For more information on this issue, check out this thread in the Ultimate Member forum with my posting at the end.
3. Check Image File Size
Ultimate Member has limits on what size in pixels and in bytes image you can upload. Go to Ultimate Member -> Settings -> Uploads to check these. PHP also has limits. Check your php.ini file in the root of your site.
4. Check Your Server Libraries
If you’re self-hosting your site (say, on Amazon AWS), you’ll need to make sure you have the php-gd library installed (yum install php70-gd). This is required for image uploading to work.
If you have commercial shared hosting like GoDaddy, most likely this library is already installed.
Thank you to reader Christos Symeou for this insight!
5. More Suggestions from UM
If none of these has worked, try out these suggestions from Ultimate Member, including checking your server’s file permissions.
I hope this has helped solve your problems with uploading cover photos in Ultimate Member. If you’ve found other solutions, please let me know by posting below! – Brian