New ContentId format for easy thumbnail loading

Hello Developers,

RbxThumb is a new ContentId format that allows easy loading of thumbnails. It works everywhere you would expect image ContentIds to work including in ImageLabel.Image and ContentProvider:PreloadAsync.

The format for an RbxThumb contentId is “rbxthumb://type=[ThumbnailType]&id=[TargetId]&w=[Width]&h=[Height]”. The order of parameters is enforced.

For example, if you wanted an ImageLabel with a thumbnail of my lovely avatar on it you would set the Image property to:
rbxthumb://type=Avatar&id=2231221&w=720&h=720

Supported thumbnail types and sizes:

Type:               Supported Sizes:
"Asset"             150x150, 420x420
"Avatar"            100x100, 352x352, 720x720
"AvatarHeadShot"    48x48,   60x60,   150x150
"BadgeIcon"         150x150
"BundleThumbnail"   150x150, 420x420
"GameIcon"          50x50,   150x150
"GamePass"          150x150
"GroupIcon"         150x150, 420x420
"Outfit"            150x150, 420x420

RbxThumb automatically batches thumbnail requests together so loading them is more efficient. Thumbnails that are not yet ready are automatically retried up to 3 times.

For more documentation, see the rbxthumb section here:
https://developer.roblox.com/en-us/articles/Content

215 Likes

This topic was automatically opened after 13 minutes.

This new ContentID will be great for loading thumbnail icons directly from their source! I can see myself using this in a number of different situations.

I may be out of the loop but I was wondering what exactly the “Outfit” thumbnail type relates to? I can’t seem to find any documentation specifically explaining the term on the Developer Hub.

Is the “Outfit” thumbnail type synonymous with what are now known as “Costumes”? If that’s the case, how would one load a specific costume? I’m not aware of a method of retrieving specific costume IDs.

11 Likes

Will there be a property in the Image URL of an avatar to just have the face or is that already a feature?

3 Likes

This post was flagged by the community and is temporarily hidden.

26 Likes

I’m pretty sure the “Outfit” thumbnail is the image of the saved outfit you want to load? Little confused on what you were trying to ask but I think that’s what you meant

4 Likes

Hello. Previously attempting to load a newly changed avatar’s thumbnail resulted in an error or a white image. This is a big problem for UIs that depend on it. Is this now fixed, or is it just not possible to fix?

2 Likes

Does Players service’s :GetUserThumbnailAsync() now return a rbxthumb URL?

4 Likes

Sounds like you want the AvatarHeadShot thumbnail type.

4 Likes

Alright, thanks alot! Will keep this in mind next time I need this.

2 Likes

There is a web endpoint that allows you to get the outfit/costume ids. https://avatar.roblox.com/v1/users/2231221/outfits

5 Likes

Oh, I wasn’t aware of that. That makes a bit more sense. Thanks for clearing that up!

I’m still a little confused as to how the Outfit thumbnail type could be practically used but perhaps its use cases are beyond my current level of scripting experience.

3 Likes

Is there a reason the selection of sizes is so limited? As an example, the game icons uploaded to Roblox can be 1080x1080 for Xbox, but the API only shows 50x50 and 150x150. Also, the sizes are very inconsistent, like Avatar being the only one with 352x352 and AvatarHeadShot being the only ones with 48x48 and 60x60?

7 Likes

I think the max size for GameIcons is 1024x1024. We plan on adding sizes 512x512, 256x256 and 128x128 for GameIcons. The sizes are mostly picked based on sizes we want to use internally and the most common size currently in use. If we allowed many more sizes the chances that a requested size was not already generated would be increased.

9 Likes

This is so much better/more concise than the ones we had to use previously, thank you!

1 Like

Why the order of parameters is enforced for rbxthumb?

The first of the two options below is much easier to write:
'rbxthumb://type=Avatar&w=100&h=100&id='..uid
'rbxthumb://type=Avatar&id='..uid..'&w=100&h=100'

7 Likes

I agree - I don’t see any reason to enforce the order of parameters.

3 Likes

Will old endpoints be deprecated anytime soon? A lot of older content I have relies on those.
Also this seems like a much better and more uniform system so I look forward to using it more soon :smiley:

These are some of the endpoints I’m talking about:

2 Likes

Will avatar busts be supported?

2 Likes