Content Data Types
Content Data Types
On Roblox, content is a special formatted string that refers to an asset, such as an image, sound, or mesh. For safety reasons, the ContentProvider
service prevents links to files not on trusted sites from loading. The following diagram shows how the filter works:
Content Formats
Content can be formatted in several ways. All formats point to either an online file or a file saved to the client’s computer. The basic structure is a protocol name, followed by ://, then a string which depends on the protocol used.
Protocol | String | Description |
---|---|---|
rbxasset | A file path | Fetches a file from Roblox's content folders. |
rbxassetid | An existing asset ID | Fetches a user-created asset on the Roblox website. |
rbxgameasset | Folder/category + asset name | Fetches an asset uploaded through the Asset Manager. |
rbxhttp | A path on the Roblox website | Fetches content from the Roblox website. |
rbxthumb | Parameters and values | Allows for easy loading of thumbnails. |
http / https | A website URL | Fetches content from a website using a URL. |
Protocols
rbxasset
This points to Roblox’s content folder on the user’s computer.
Here are the content folder locations for supported operating systems:
Windows — %localappdata%\Roblox\Versions\<version>\content
Mac — Applications/RobloxStudio.app/Contents/Resources/content
rbxassetid
This points to a user-created asset on the site. For example, the following rbxassetid points to an image created by Roblox:
And this is its URL equivalent:
rbxgameasset
This points to an asset uploaded through the Asset Manager. It allows access to assets by a user-friendly name instead of ID, so if you upload an image named Potion.png, you can reference it as:
In the above example, “Images” is the category/folder that appears in the Asset Manager, and “Potion” is the asset name, minus its extension.
rbxhttp
This is basically shorthand for ContentProvider/BaseUrl
. For example:
Will expand to:
rbxthumb
This is a content format that allows for easy loading of thumbnails. It works everywhere you’d expect an image content ID to work, for instance ImageLabel/Image
or ContentProvider/PreloadAsync|ContentProvider:PreloadAsync()
.
The format for rbxthumb is as follows:
For example:
Supported Types and Sizes »
Type | Supported Sizes |
---|---|
Asset | 150×150, 420×420 |
Avatar | 100×100, 352×352, 720×720 |
AvatarHeadShot | 48×48, 60×60, 150×150 |
BadgeIcon | 150×150 |
BundleThumbnail | 150×150, 420×420 |
GameIcon | 50×50, 150×150 |
GamePass | 150×150 |
GroupIcon | 150×150, 420×420 |
Outfit | 150×150, 420×420 |
http / https
This points to the exact location of something on the internet. It only works on Roblox-approved sites and will raise an error if used otherwise.