ImageLabel warns when changing image

Hey! I recently ran into a problem while changing my ImageLabel's image with code. When I try to change it, I get a warning and the image doesn’t load, however.

This is the warning:

Image https://assetdelivery.roblox.com/v1/asset?id=7919061552 failed to load. Error 403: Asset type does not match requested type

I store the ID of the image in an Attribute as a string. The lines that change the image are:

Line 1: evidenceframe.EvidenceImage.Image = "rbxassetid://" .. b:GetAttribute("ImageID")
Line 2: frame.EvidenceImage.Image = "rbxassetid://" .. c:GetAttribute("ImageID")

and the line that sets the attribute is:
b:SetAttribute("ImageID", tostring(v.ImageID))

The decal is approved, and when I change it manually in studio it works just fine.

1 Like

That’s because you’re using the decalId of the image as opposed to the assetId.

Try using this ID instead: 7919061527

2 Likes

Thank you, that ID worked for me.

I have many other images though, how can I find the correct IDS for those?

Edit: Nevermind, found out that I can find the ID by putting it into an ImageLabel, and then copy whatever comes out of it. Thanks for the help!