New image endpoints that can be used in-game!

Tried this method in a ImageLabel.
Didn’t go well.

Bust:

1 Like

I don’t see the same result when using it as the Image for an ImageLabel?

4 Likes

Yes

3 Likes

Found out that it was happening, because my frame was sized wrong.

2 Likes

Someone may want to update the wiki for this.
Also, can the &width=420&height=420 be changed to something smaller (ex: 200 x 200, 120 x 120) with it actually returning the image size? I plan to use the head-shots for my round selector, and the image labels are about 100x100.

2 Likes

I’ve updated the page.
Https added to all links and ofc the images from this post.
(waiting approval)

1 Like

@Wsly You prayers have been heard. Thanks @WebGL3D

2 Likes

These are awesome!!!

I’ll just repeat a suggestion I made earlier, when the character doesn’t load and therefore returns a solid grey “?” image on any of these textures, can we have those be replaced by a ghost version of what you would expect it to return? In nearly any game utilizing these head shots I’ve seen at least one player continuously showing up as a huge grey square. It breaks any interface and is a major flaw preventing great designs!!

7 Likes

Sizes can be the same as Avatar.ashx, and Asset.ashx:
48 x 48
60 x 62
75 x 75
100 x 100
110 x 110
160 x 100
250 x 250
352 x 352
420 x 230
420 x 420

17 Likes

What we need is a Lua API for requesting thumbnails that returns whether or not the thumbnail is still loading. That way, the developer can choose not to display an image, or to poll until the image loads. This is what the ROBLOX website does.

24 Likes

I’m using the R15 beta character and for headshots I am getting this:

Notice the shirtless torso and arms. Compare that to my online profile and you will see I am wearing a shirt.

4 Likes

R15 is having issues with rendering clothing at the moment. I don’t think it’s an issue with the thumbnails themselves.

3 Likes

Could we get one that’s just their head, no body on it so that we can place it over things and use it more like an icon?

10 Likes

A temporary workaround for this is to set up a server to poll the endpoint’s json, and use HttpService against your server.
All the endpoints I listed in the original post have jsons if you replace ‘image’ with ‘json’
e.g. https://www.roblox.com/headshot-thumbnail/json?userId=48103520&width=420&height=420&format=png

6 Likes

These are finally enabled, I love you <3

2 Likes

I successfully implemented this temporary workaround on my server. However, because of the frequency of my requests, I’m receiving “403 Forbidden - DOSarrest Internet Security”

This thread is around a year old. Does anyone know if there is now a better way of checking if a player’s image has loaded before displaying it, as to prevent the grey box? Perhaps what @Merely suggested above?

4 Likes
local thumbnail, loaded = game.Players:GetUserThumbnailAsync(11111111, "HeadShot", "Size352x352")
if not loaded then
    print("Thumbnail not loaded!")
end
15 Likes

Thank you!

1 Like

No problem!