[wp-trac] [WordPress Trac] #16020: Upload custom avatar for user in Dashboard

WordPress Trac noreply at wordpress.org
Wed Jul 15 12:09:42 UTC 2020


#16020: Upload custom avatar for user in Dashboard
-------------------------------------+-------------------------------------
 Reporter:  computerwiz908           |       Owner:  whyisjake
     Type:  feature request          |      Status:  accepted
 Priority:  normal                   |   Milestone:  Future Release
Component:  Users                    |     Version:
 Severity:  minor                    |  Resolution:
 Keywords:  has-patch needs-refresh  |     Focuses:  ui, administration,
  has-screenshots                    |  privacy
-------------------------------------+-------------------------------------

Comment (by mdwolinski):

 Do we think about adding a local avatar the same as uploading file?
 Perhaps the better path would be to separate avatar modification from
 piggy-backing on file uploading.

 Because a large majority of users who could have this capability would be
 Subscribers, permissions to use this feature could be gated by users who
 are logged in (to be Subscriber inclusive) or users who have upload_files
 capability. Of course, a new capability would probably be a better path,
 but I know new capabilities in multi-site could be problematic, and if
 this is the proper path, by default, this capability is not enabled/added
 to roles.  Settings for this feature is where/when the capability is added
 to the role.

 I think having the capability for local avatars presents an issue of how
 many images will be in the media library.  I see possibly two paths to
 this:

 First option, avatars are uploaded to the current media library like a
 normal file, tagged as an avatar but not displayed by default until a user
 clicks on an Avatar filter, which then only shows avatars.  This would
 help prevent users who are looking for media to insert into posts, etc
 from being overloaded with a constant ever changing number of unrelated
 images being uploaded.

 Second option, create a new Avatar Library that sits within the **wp-
 content/** folder.  Replicates how the uploads folder works with
 year/month.

 I think when avatars are uploaded, they can either use the filename of the
 avatar that was uploaded, similar to how the current media library works,
 but I'm think that there should be a unique hash created for the image
 file name.  This would eliminate people using filenames that the admin may
 prefer not be used and prevent people from trying to mass view/download
 other avatars.

 There should probably be a way for Admins (or delegated levels with a
 capability) to be able to review avatars easily.  With a separate media
 library for just avatars, when an avatar is uploaded, its natural state is
 "unreviewed."  An admin could then click on a filter and view all
 unreviewed avatars.  An option on the dropdown could be "Mark Reviewed"
 for any checked (or user selected all).  Then meta for those images gets
 updated.

 Users should only have one avatar file at any given time.  So if a user
 uploads a new file, the old one is deleted.  If we're using hashed file
 names, a new file would have a new hashed name.

 Wondered also if there should be the ability to allow a user to import
 their Gravatar to a local avatar, the one main reason I can think of is if
 a user wants that image on this site but then updates their Gravatar for
 other sites.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/16020#comment:130>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list