Avatar URL endpoint

Is there an endpoint to get the user’s avatar URL?

1 Like

Call https://meta.discourse.org/u/falco.json and check .user.avatar_template

3 Likes

Checked :+1:t3:

So there is no endpoint for getting the avatar. I have to first reach the user information and then craft something for getting the image URL based on some size?

I was expecting to find something like /users/{user_id}/avatar.json.

1 Like

Looks like it. What problem are you trying to solve? You want to use the Discourse avatar on some other site?

1 Like

Yup, that is exactly the case. There are other subdomains holding other apps and we wanted to use the Discourse avatar on them :raised_hands:t3:

1 Like

If you put a 1 for the filename, it gets the latest. 100 is the size. It can be anything

https//meta.discourse.org/user_avatar/meta.discourse.org/pastawhiskey/100/1.png