Converting Image ID to Decal ID?

I need to find a way to convert Image IDs [the ones you usually convert from Decal ID to Image] and convert it into a Decal ID. How can I do this via a script? I can’t find a response.

:sweat:

1 Like

This might be of use to you:
https://devforum.roblox.com/t/open-source-roblox-imageid-to-decalid-converter-api/450451

1 Like

Hi, this is Decal to IMAGE, not IMAGE to Decal.

Is there any other solutions?

Something like this (may or may not need slight adjustments):

local function imageToDecal(id)
    if type(id) == "number" then
        return `rbxassetid://{id}`
    elseif type(id) == "string" then
        return table.pack(id:gsub("rbxassetid://", "https://www.roblox.com/asset/?id="))[1]
    end
end

This is possible via scanning up and down on sequential assetids, or by using InsertService. However, due to recent permission changes, you need access to the decal (own, group own, roblox asset, etc). There’s likely a way around this, but doing so might break the ToS, and is not something I have time to tinker with unfortunately.