Getting Decal Image Url

Is it possible to use an ImageId (From decals) to get an image url so I can use it for things such as discord webhooks? If it is, please point me in the right direction, thanks.

(In other words, getting the image url from a decal.)

Yes you can, the link is just: + id

--For example if the id was 123456789 then the link is:


Are you wanting to convert a decal id into an image url?If so, you can try this url out I believe


Or wait I’m not sure if I understood the question correctly

I’m trying to convert the decal id to an image url, like you said, I’ll try out what you linked, thanks.

1 Like

I’m not sure how likely it is to work since this is typically used for converting a decal id into an image url for use in roblox games

I tried it out and sadly it still didn’t work with my script.

Here’s the script:

function GetImageUrl(player)
	local Layout = player.PlayerGui.CustomBadges.Begin.Type.Value
	local Image = player.PlayerGui.CustomBadges.Middle.Type.Value
	local HS = game:GetService("HttpService")
	local Api_Url = ""
	local Data = {}
	if Layout == 1 then
		Data = {
			["foreground_url"] = game:GetService("Players"):GetUserThumbnailAsync(player.UserId, Enum.ThumbnailType.AvatarThumbnail, Enum.ThumbnailSize.Size420x420),
			["background_url"] = ""..Image.."&22&width=420&height=420&format=png"
	elseif Layout == 2 then
	Data = {
			["foreground_url"] = game:GetService("Players"):GetUserThumbnailAsync(player.UserId, Enum.ThumbnailType.AvatarThumbnail, Enum.ThumbnailSize.Size420x420),
			["background_url"] = ""..Image.."&22&width=420&height=420&format=png"
		Data = HS:JSONEncode(Data)
	local ReturnData
		ReturnData = HS:PostAsync(Api_Url, Data)
	if ReturnData ~= nil then
		ReturnData = HS:JSONDecode(ReturnData)
		return ReturnData["output_image"]["url"]
		warn("No images were found.")

I got this error using pcalls:
Screen Shot 2021-04-01 at 10.35.46 AM

Yeah, just use the link:


No you can’t use it it will throw you an error.

Use this instead:

local httpService = game:GetService("HttpService")
local AssetID = --your assetid
local IconUrl = httpService:JSONDecode(httpService:GetAsync(""..AssetID.."&size=250x250&format=Png&isCircular=false")).data[1].imageUrl

Also very helpful website for getting this URL’s is:
Thumbnails Api (

And also please next time try to use Search because I find this solution here on DevForum before.


How would I do this for a player? I know there’s a function that gets the player’s image, but it doesn’t work in the script.

Like for Player Image? (Thumbnail etc.)
Also can you show me your code again?

Yes ofc! Here is the code I use to get the results you are looking for.

local function fetchThumbnailUrl(decal)
	local success, result = pcall(function()
		local assetId = decal:match("rbxassetid://(%d+)") or decal:match("https?://.+/asset/?id=(%d+)")
		if not assetId then
			error("Invalid asset ID format.")
		local url = ""..assetId.."&returnPolicy=PlaceHolder&size=512x512&format=Png&isCircular=false"
		local response = HttpService:GetAsync(url)
		local data = HttpService:JSONDecode(response)

	if success then
		return result
		warn("An error occurred: " .. result)
		return nil
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.