How to get a user avatar from username?


#1

What’s the recommended way to get a user’s avatar from their username in a plugin?

I did find some reference to lookupAvatar(username) in quote.js.es6, but there doesn’t seem to be much out there regarding avatars.


#2

ok, so I was able to get the avatars to work using:

const opts = helper.getOptions();

opts.lookupAvatar(username);

which works and will display the avatar in the post, but will freeze up the preview when composing a new post/reply.

Any help would be appreciated. Thanks!


(Bolarinwa Balogun) #3

How did you get helper?