Grabbing player avatar images from link

So it appears Roblox recently changed how they generate images of users’ avatars, which has broken a minor function of one of our webhooks.

Originally, we used the line

avatar_url = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&userId="..player.UserId

to grab an image of the player’s avatar. This has since broken.

Due to the nature of the way we’re doing this, I don’t think we’d be able to use
Players:GetUserThumbnailAsync, as that’s more for GUIs and things in-game as opposed to external resources.

Currently, when I try to get my own avatar image, it gives me a URL like this:
https://tr.rbxcdn.com/96974da4e61b4f672f56c4c6001c0e29/352/352/Avatar/Png
Which, sadly, doesn’t incorporate the user’s ID at all. Instead, it seems to generate a completely different, longer identifying string. Going through the properties of Player on Documentation, there’s no such thing I can call, so getting this string seems to be impossible.

Does anybody know about any other way to get the link to an image of a user’s avatar using their user ID? It just makes life easier.
This is totally just a silly feature of our webhook which gives face-to-a-name effectively, and we don’t really need it at all, we just like it a lot.

‘rbxthumb://type=Asset&w=420&h=420&id=’ …player.UserId

Breaks the script- throws a HTTP 400 error.
It seems it has an issue with the lack of it being an actual link.

AAAND found a fix.
Though our original used the full avatar image, the headshot will do!

 "https://www.roblox.com/headshot-thumbnail/image?userId="..player.UserId.."&width=420&height=420&format=png"
2 Likes

Hey, there are image endpoints that you can use to get the full body, you can view them here.

Hello! I’ve tried that solution since im having the same problem, but it doesnt show the image. Is there any fix for that? – Nevermind, i just formatted the thumbnail wrong.