How to get Image URL from Decal? (through scripts)

So in the Image URL It would be like:

So, How do I get Image URL from Decal?

1 Like

Insert an ImageLabel/ImageButton instance and paste the decal’s ID into its “Image” field, the ID will be automatically translated into its corresponding image ID.

No, that’s not what I meant.

I meant URL Link like this:
Png (420Ă—420) (rbxcdn.com)

Oh, you right click on an image on the Roblox site and then click “open image in new tab”, this may be differ depending on the browser.

1 Like

Yes, but how would I get an URL from Decal? (through scripts)

Are you asking how to get the URL of a decal using a script?

Yes.

Do you still need assistance with this? If so you can try this

local decally = script.Parent --Change this to the root of your decal
local decalId = decally.Texture

In other words to get the URL of a decal you can just do .Texture of the decal and that will give you the URL of the current image on a decal. Sorry in advanced if I poorly explained that.

if you just want copy smt you can actually use gui image and screenshot it

Use the Thumbnails api:

https://thumbnails.roblox.com/v1/assets?assetIds=(ID HERE)&returnPolicy=PlaceHolder&size=512x512&format=Png&isCircular=false

For example, to get the image of Grass Green Stud with id 108148249881966, get the URL:

https://thumbnails.roblox.com/v1/assets?assetIds=108148249881966&returnPolicy=PlaceHolder&size=512x512&format=Png&isCircular=false

Which will respond in JSON:

{
  "data": [
    {
      "targetId": 108148249881966,
      "state": "Completed",
      "imageUrl": "https://tr.rbxcdn.com/180DAY-eff4d899940cce528b1f46ba99f6d6dd/512/512/Decal/Png/noFilter",
      "version": "TN3"
    }
  ]
}

Please note that this API can’t be called inside Roblox. It does work on other websites, so using a proxy makes it usable in-game. This requires some knowledge about HTTP requests and JSON. If you need any explanation about that, let me know!