ContentProvider:PreloadAsync Failing

Hello, I’m experiencing this issue with my ImageLabel Id’s. All Id’s are correct (well, there’s already one).
Firstly, images weren’t loading. I heard that using this service solves it. But it doesn’t work for me.

Script:

-- Services
local RepStorage = game:GetService("ReplicatedStorage")
local ContentProvider = game:GetService("ContentProvider")
-- Variables
local MainFrame = script.Parent
local maps = RepStorage.Maps:GetChildren()
local assets = {}
-- URL
local baseURL = "rbxassetid://"
-- Loop
for i, v in pairs (maps) do
	table.insert(assets, i, baseURL..(v.ImgId.Value))
end
spawn(function()
ContentProvider:PreloadAsync(assets)
end)
for i, v in pairs (maps) do
	local Frame = Instance.new("Frame", MainFrame)
	Frame.Name = v.Name.." Map"
	Frame.BackgroundColor3 = Color3.fromRGB(72, 72, 72)
	Frame.Size = UDim2.new(0.13, 0,0.329, 0)
	Frame.ZIndex = 10
	local Text = Instance.new("TextLabel", Frame)
	Text.BackgroundTransparency = 1
	Text.Font = Enum.Font.GothamBold
	Text.TextScaled = true
	Text.Name = "MapName"
	Text.Text = v.Name
	Text.Size = UDim2.new(1, 0,0.306, 0)
	Text.Position = UDim2.new(0, 0,0.653, 0)
	Text.ZIndex = 15
	local ImgLabel = Instance.new("ImageLabel", Frame)
	ImgLabel.Size = UDim2.new(1, 0,0.694, 0)
	ImgLabel.Image = baseURL..(v.ImgId.Value)
	ImgLabel.ZIndex = 15
end

Error: 01:06:53.629 - ContentProvider:PreloadAsync() failed for rbxassetid://5037209223

This is like the issue from yesterday that I responded to: you’re supplying an invalid asset. Images need to be loaded by their image asset id, not their decal asset id. Use the id 5037209207.

Image assets are internally used for rendering in games, while the decal asset just provides website information in applicable places such as your inventory or the developer library.

Decal: https://www.roblox.com/library/5037209223/baseplate-icon
Image: baseplate_icon - Roblox

1 Like