Image failed to load

Hello, developers.

I am currently making a pet system for my game, and for some reason all of the images “fail to load”. Here’s the output:

The images have gotten uploaded to ROBLOX, and they are in Group Creations.

Any contributions are appreciated. :slightly_smiling_face:

7 Likes

I’m pretty sure the Image needs to be of the form

rbxassetid://<number from link>

Have you tried this?

That’s exactly what I am doing.

You need to preload the image

What do you mean by preload?

Try posting the link into a decal, and get the rbxassetid:// instead.

Make sure that you are putting quotation marks, as it is a string.

~~ContentProvider | Documentation - Roblox Creator Hub

Edit: Preload is deprecated

The images are group decals, and I am using rbxassetid://.

Preload is deprecated, use PreloadAsync.

Edit: Notwal beat me to it. Preloading won’t solve this issue, it will only make assets load in quicker if they can be loaded in.

2 Likes

Preloading the image will not solve the fact that the image can’t be loaded in

2 Likes
local image = --asset
local Image2 = -- next asset

local assets = {image, image2}

game:GetService("ContentProvider"):PreloadAsync(assets)

Also, yes, @Notwal’s post is correct.

1 Like

Hmm, that usually solves the issue in my case

I had this problem and I solved it like this Copy ID and paste it in decal then copy the link from the decal and paste it wherever you want(when you are changing images from script).

Hope this helps.

For example, if my image id is 1564949 sometimes when I paste that in decal it changes to original id don’t know why.

10 Likes

Images that are not approved to be decals do not get loaded into games. Make sure that this isn’t the case.

1 Like

Check if the images were moderated. Failed requests can also be caused by bad internet speeds.

If the image cannot load try to rejoin in the studio or if it doesn’t work just upload image another time.

I’ve tried preloading it and it didnt seem to work. However, @DevOfLua’s way of pasting the ID into a decal worked.

1 Like

The reason this is happening is because you’re trying to load a catalogue ID, not an image asset id. Anything displayed in-game is handled by its asset ID. This is also why pasting your ID into an asset id box converts the number to an in-game usable format.

Preloading doesn’t solve the issue because the asset id itself is not a proper usable asset. It’s merely a unique identifier on the site library.

8 Likes

I know this was article was created over a year ago, but I found a solution that works.
Set the texture or image property to: “https://www.roblox.com/asset-thumbnail/image?assetId=” … Id … “&width=420&height=420&format=png”

Directly setting the texture or image property to the decal or asset Id of the decal Id doesn’t work because the game doesn’t know to load the image. I’m not sure exactly why the way I showed works and the other doesn’t, but I think it has something to do with the fact that this pulls the image from Roblox in real-time.

6 Likes