• Resolved dumidu

    (@dumidu)


    I’m trying to update user profile’s avatar using the WordPress REST API method,

    Users API Reference

    But according to the REST documentation avatar parameter is Read only, Is there an easy way to update the profile picture without using a custom endpoint?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    By default there is no internal avatar image URL. Most avatars are either static or generated on the fly from the user’s email address hash. If the gravatar option is used, images come from the gravatar API. So there is nothing to even read regarding user avatar URLs through the API, much less set. Instead of labeling it read only, reserved for future use might be a better label.

    If your site uses an avatar plugin, it’s up to the plugin to implement a REST endpoint that can be used to manipulate related values. In that case, please inquire through the plugin’s support channel.

    Thread Starter dumidu

    (@dumidu)

    @bcworkz Thank you for the reply.

    Currently I don’t use any avatar plugin. Do you have any suggestion for that.

    Moderator bcworkz

    (@bcworkz)

    Sorry, no. You could try searching. The sticking point is probably whether a REST endpoint is provided. I personally rely on Gravatar to let users manage their own avatars and stay out of it entirely. Letting random users upload to your site does carry some security risk.

    Thread Starter dumidu

    (@dumidu)

    @bcworkz Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘WordPress REST API: user profile avatar update’ is closed to new replies.