Forum Discussion

omygoodness's avatar
8 years ago

How to replace default set of avatars?

I would like to change avatars which are available for users by default.

Should I use SDK or something else?

  • omygoodness - Yes, you can replace them from Studio. Go to Community Style > Select Asset Library (from dropdown) > Avatars. You can upload your avatar collection here.

     

    /t5/bizapps/bizappspage/tab/community%3Astudio%3Acommunity-style?style=asset 

     

    Hope this helps.

  • omygoodness - Yes, you can replace them from Studio. Go to Community Style > Select Asset Library (from dropdown) > Avatars. You can upload your avatar collection here.

     

    /t5/bizapps/bizappspage/tab/community%3Astudio%3Acommunity-style?style=asset 

     

    Hope this helps.

    • IanM's avatar
      IanM
      Khoros Alumni (Retired)

      Does this solution imply that any unwanted avatar sets should be deleted?

    • Lindsey's avatar
      Lindsey
      Leader

      Is there a way to do this through the SDK? I uploaded through the SDK but when I reverted to an earlier version I lost them. I'd like to have them in our SDK plugin to prevent this from happening

  • just a quick point to be aware of... If you remove the legacy avatars anyone useing the removed avatars will have a "missing image " for their avatar, you can get a script ran which will replace all users using an old avatar with a new one but its a professional services job. 


    Thanks 

    • ClaudiusH's avatar
      ClaudiusH
      Khoros Alumni (Retired)

      Fellsteruk wrote:

      just a quick point to be aware of... If you remove the legacy avatars anyone useing the removed avatars will have a "missing image " for their avatar, you can get a script ran which will replace all users using an old avatar with a new one but its a professional services job. 


      There's also an option on the frontend to prevent invalid avatars to break the UI through the usage of the "onerror" attribute the following way

      <img src="invalid_avatar_link"  onerror=this. onerror=null;this. src='https://placeimg.com/200/200/animals';">

      (NB: When copying above code sample be mindfull to replace the first double apostrophes '' for the onerror parameter value with proper double quotes. Had to somewhat work around our strict script filters here ;) )

      On community you could e.g. have a JavaScript add this attribute to all elements matching .UserAvatar a (and maybe have the animal pictures replaced by a default avatar icon :smileywink: ).