Skip Navigation

[Resolved] We want to add profile picture to be uploaded by user

This support ticket is created 3 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 3 replies, has 3 voices.

Last updated by Jamal 3 years, 4 months ago.

Assisted by: Jamal.

Author
Posts
#2129539

We want to every user to have a profile picture and that the user can view and change it from the dashboard. However, when the user is choosing the image in user registration form or user edit form, it doesn't get updated neither in the backend nor the front-end(dashboard). Also, in the backend(WordPress admin) we can't change the image for any user and its accepting only the default gravatar. So, we are unable to understand how we can setup simple profile picture adding and changing system. We need help ASAP.

#2129849

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2021-07-30 at 15.44.09.png

Toolset doesn't offer anything special in relation to user profile pictures, and out of the box, WordPress tries to force its gravatar system on you (screenshot).

You can add a custom field group for user fields and include an image field in that to use as a profile picture on the front end (depending on how you make a profile page for the front end).

You can make front-end forms for registering or editing users where they submit the profile picture (along with other fields), but there isn't any way to change the back end profile page to exclude the native Profile Picture gravatar field without using custom code.

#2130213

I Added a custom field group (User fields) and added an Image field to it. And then added it to the registration and the login form. Things are working fine. User is able to upload the profile image in the register form an is able to edit it in the dashboard. But I am unable to figure out how to show the user profile image using a block in dashboard like Image block do not have my source of custom fields. How can I do this?

#2130389

Well, Blocks do not support term fields and user fields yet. You will need to use a shortcode. And that will depend on where you want to display it.

If you want to display it on the author archive, you can use the wpv-user shortcode. https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-user

If you want to display it on a content template of a post, you will need to use nested shortcode like this thread https://toolset.com/forums/topic/display-user-avatar-and-description-for-guests-content-template/

Check the default shortcode for an image field here, and check the example for user images https://toolset.com/documentation/customizing-sites-using-php/functions/#image

I hope this helps. Let me know if you have any questions.