Open source Roblox ImageID to DecalID converter API

Basic Links

API: https://rbxdecal.glitch.me/
Module: rbxdecal API module - Roblox

Why did I create this?

As a Roblox developer the recently used method of subtracting 1 from the Image ID to get the Decal ID no longer works and not makes it harder than ever for users to insert their images into roblox. I used to use Classy-Studio’s API but that recently stopped working and I was put at a dead end of not being able to get the Image ID anymore.

Roblox natively supports the conversion of a DecalId to an ImageId via rbxthumb ContentId, but since this project is open source I figure it still has value to provide as a resource.

How does it work?

It sends a request to roblox’s http://www.roblox.com/asset/?id= API which returns XML data of the asset, from there I take the decal ID from the parsed XML and use that to return the Decal ID

How do I use it?

You can use the module I created or you can send your own API requests to our server!

API Documentation


Example

Conclusion

As always It’s open sourced so that you can view all the code! Have fun hacking devs! Rbxdecal

29 Likes

I also have a utility that would go well with this. It was meant for personal use, so no fancy documentation.

https://sprite-splitter-utility.glitch.me/:imageId
returns a JSON containing the width and height of the original image. Append .png to the end of the URL to get the image itself.

Used it in a tampermonkey script that displays the image ID, width and height when visiting a decal’s library page.

4 Likes

Don’t you mean Decal ID to Image ID? Decal ID is the ID that is present when going to the Decals section in the library, and is normally the ID that players will insert, whereas the image ID is the actual ID the game needs to load the image. The post, as well as the website appears to have it backwards in most places, and in others it is correct.

Cool API though, will definitely use this if I find it fit.

1 Like

You can just go into the toolbox and do this though?
ID gets you the raw ID and URI gets you “rbxassetid://”
image

Alternatively you can just paste the website URL into any Image object and it will automatically do this.

3 Likes

BTRoblox ftw

image

It could be used in game for allowing users to place images without having to manually get the image ID.

2 Likes

Sure, that’s a valid use case. Should have been mentioned in OP :wink:

2 Likes

Update

Due to the fact that the stats on this glitch instance are sooooo low I’ve up’d the ratelimit to 150 requests per 65 seconds.

Notes

If you worry about your rate limit you’re able to host your own glitch instance of this for any one of your projects so you don’t need to rely on this. Here’s a short video on how to remix a project. https://www.youtube.com/watch?v=sedZVNakpto

According to some people (I haven’t tested this out myself so I have no idea how to use it) you can use contentId to get the DecalID (which is stated in the OP)

Conclusion

If you see any bugs please report them here or in my DM’s

Fixed API deprecation and changed API endpoint to the new assetdelivery endpoint. Thanks @BirminghamCityCenter for messaging me about this solution.

1 Like

Sorry for the necropost, but 4 years later, this no longer seems to work (and when I need it the most…)
Always returns 0.

Try this Convert decal ID to image ID, with your free private proxy

1 Like

I’m specifically looking for the other way around. Image ID to Decal ID…