Skip to main content

RbxThumbUtils

Wraps the rbxthumb URL api surface to generate a URL for a thumbnail on the cloud.

These thumbnails are automatically batched for performance.

Functions

getThumbnailUrl

RbxThumbUtils.getThumbnailUrl(
thumbnailTypeRbxThumbnailTypes,
targetIdnumber,
widthnumber,
heightnumber
) → string

Gets a thumbnail URL for a given content type and id

https://devforum.roblox.com/t/new-contentid-format-for-easy-thumbnail-loading/357335 https://create.roblox.com/docs/studio/asset-types#rbxthumb

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

avatarItemTypeToThumbnailType

RbxThumbUtils.avatarItemTypeToThumbnailType(avatarItemTypeAvatarItemType) → string

Converts an AvatarItemType to a string thumbnailType for thumbnail generation

getAssetThumbnailUrl

RbxThumbUtils.getAssetThumbnailUrl(
targetIdnumber,
widthnumber?,
heightnumber?
) → string

Gets a Asset URL for use in an image label or other rendering application.

Supported sizes: 150x150, 420x420

getAvatarThumbnailUrl

RbxThumbUtils.getAvatarThumbnailUrl(
targetIdnumber,
widthnumber?,
heightnumber?
) → string

Gets a Avatar URL for use in an image label or other rendering application.

Supported sizes: 100x100, 352x352, 720x720

getAvatarHeadShotThumbnailUrl

RbxThumbUtils.getAvatarHeadShotThumbnailUrl(
targetIdnumber,
widthnumber?,
heightnumber?
) → string

Gets a AvatarHeadShot URL for use in an image label or other rendering application.

Supported sizes: 48x48, 60x60, 150x150

getBadgeIconThumbnailUrl

RbxThumbUtils.getBadgeIconThumbnailUrl(
targetIdnumber,
widthnumber?,
heightnumber?
) → string

Gets a BadgeIcon URL for use in an image label or other rendering application.

Supported sizes: 150x150

getBundleThumbnailThumbnailUrl

RbxThumbUtils.getBundleThumbnailThumbnailUrl(
targetIdnumber,
widthnumber?,
heightnumber?
) → string

Gets a BundleThumbnail URL for use in an image label or other rendering application.

Supported sizes: 150x150, 420x420

getGameIconThumbnailUrl

RbxThumbUtils.getGameIconThumbnailUrl(
targetIdnumber,
widthnumber?,
heightnumber?
) → string

Gets a GameIcon URL for use in an image label or other rendering application.

Supported sizes: 50x50, 150x150

getGamePassThumbnailUrl

RbxThumbUtils.getGamePassThumbnailUrl(
targetIdnumber,
widthnumber?,
heightnumber?
) → string

Gets a GamePass URL for use in an image label or other rendering application.

Supported sizes: 150x150

getGroupIconThumbnailUrl

RbxThumbUtils.getGroupIconThumbnailUrl(
targetIdnumber,
widthnumber?,
heightnumber?
) → string

Gets a GroupIcon URL for use in an image label or other rendering application.

Supported sizes: 150x150, 420x420

getOutfitThumbnailUrl

RbxThumbUtils.getOutfitThumbnailUrl(
targetIdnumber,
widthnumber?,
heightnumber?
) → string

Gets a Outfit URL for use in an image label or other rendering application.

Supported sizes: 150x150, 420x420

Show raw api
{
    "functions": [
        {
            "name": "getThumbnailUrl",
            "desc": "Gets a thumbnail URL for a given content type and id\n\nhttps://devforum.roblox.com/t/new-contentid-format-for-easy-thumbnail-loading/357335\nhttps://create.roblox.com/docs/studio/asset-types#rbxthumb\n\nType:               Supported Sizes:\n\"Asset\"             150x150, 420x420\n\"Avatar\"            100x100, 352x352, 720x720\n\"AvatarHeadShot\"    48x48,   60x60,   150x150\n\"BadgeIcon\"         150x150\n\"BundleThumbnail\"   150x150, 420x420\n\"GameIcon\"          50x50,   150x150\n\"GamePass\"          150x150\n\"GroupIcon\"         150x150, 420x420\n\"Outfit\"            150x150, 420x420",
            "params": [
                {
                    "name": "thumbnailType",
                    "desc": "",
                    "lua_type": "RbxThumbnailTypes"
                },
                {
                    "name": "targetId",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "width",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "height",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 38,
                "path": "src/rbxthumb/src/Shared/RbxThumbUtils.lua"
            }
        },
        {
            "name": "avatarItemTypeToThumbnailType",
            "desc": "Converts an AvatarItemType to a string thumbnailType for thumbnail generation",
            "params": [
                {
                    "name": "avatarItemType",
                    "desc": "",
                    "lua_type": "AvatarItemType"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 52,
                "path": "src/rbxthumb/src/Shared/RbxThumbUtils.lua"
            }
        },
        {
            "name": "getAssetThumbnailUrl",
            "desc": "Gets a Asset URL for use in an image label or other rendering application.\n\nSupported sizes: 150x150, 420x420",
            "params": [
                {
                    "name": "targetId",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "width",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "height",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 72,
                "path": "src/rbxthumb/src/Shared/RbxThumbUtils.lua"
            }
        },
        {
            "name": "getAvatarThumbnailUrl",
            "desc": "Gets a Avatar URL for use in an image label or other rendering application.\n\nSupported sizes: 100x100, 352x352, 720x720",
            "params": [
                {
                    "name": "targetId",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "width",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "height",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 91,
                "path": "src/rbxthumb/src/Shared/RbxThumbUtils.lua"
            }
        },
        {
            "name": "getAvatarHeadShotThumbnailUrl",
            "desc": "Gets a AvatarHeadShot URL for use in an image label or other rendering application.\n\nSupported sizes: 48x48, 60x60, 150x150",
            "params": [
                {
                    "name": "targetId",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "width",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "height",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 110,
                "path": "src/rbxthumb/src/Shared/RbxThumbUtils.lua"
            }
        },
        {
            "name": "getBadgeIconThumbnailUrl",
            "desc": "Gets a BadgeIcon URL for use in an image label or other rendering application.\n\nSupported sizes: 150x150",
            "params": [
                {
                    "name": "targetId",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "width",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "height",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 129,
                "path": "src/rbxthumb/src/Shared/RbxThumbUtils.lua"
            }
        },
        {
            "name": "getBundleThumbnailThumbnailUrl",
            "desc": "Gets a BundleThumbnail URL for use in an image label or other rendering application.\n\nSupported sizes: 150x150, 420x420",
            "params": [
                {
                    "name": "targetId",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "width",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "height",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 148,
                "path": "src/rbxthumb/src/Shared/RbxThumbUtils.lua"
            }
        },
        {
            "name": "getGameIconThumbnailUrl",
            "desc": "Gets a GameIcon URL for use in an image label or other rendering application.\n\nSupported sizes: 50x50, 150x150",
            "params": [
                {
                    "name": "targetId",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "width",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "height",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 167,
                "path": "src/rbxthumb/src/Shared/RbxThumbUtils.lua"
            }
        },
        {
            "name": "getGamePassThumbnailUrl",
            "desc": "Gets a GamePass URL for use in an image label or other rendering application.\n\nSupported sizes: 150x150",
            "params": [
                {
                    "name": "targetId",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "width",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "height",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 186,
                "path": "src/rbxthumb/src/Shared/RbxThumbUtils.lua"
            }
        },
        {
            "name": "getGroupIconThumbnailUrl",
            "desc": "Gets a GroupIcon URL for use in an image label or other rendering application.\n\nSupported sizes: 150x150, 420x420",
            "params": [
                {
                    "name": "targetId",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "width",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "height",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 205,
                "path": "src/rbxthumb/src/Shared/RbxThumbUtils.lua"
            }
        },
        {
            "name": "getOutfitThumbnailUrl",
            "desc": "Gets a Outfit URL for use in an image label or other rendering application.\n\nSupported sizes: 150x150, 420x420",
            "params": [
                {
                    "name": "targetId",
                    "desc": "",
                    "lua_type": "number"
                },
                {
                    "name": "width",
                    "desc": "",
                    "lua_type": "number?"
                },
                {
                    "name": "height",
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 224,
                "path": "src/rbxthumb/src/Shared/RbxThumbUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "RbxThumbUtils",
    "desc": "Wraps the rbxthumb URL api surface to generate a URL for a thumbnail on the cloud.\n\nThese thumbnails are automatically batched for performance.",
    "source": {
        "line": 8,
        "path": "src/rbxthumb/src/Shared/RbxThumbUtils.lua"
    }
}