How would I get a game's icon?

I am trying to make a loading screen and need a way to get the icon of my game, without having to upload an icon of the game to Roblox myself. Since this needs to be local I cannot make any direct http requests.

I have tried multiple ways of doing this, but it hasn’t proven successful.

I have tried the method on this page but it returns a default Roblox place icon.

7 Likes

As far as I know, you can’t. You’ll have to upload.

I personally didn’t look as much as I could have, but I found this developer forum post that might help you.

If this doesn’t help you, you can always try looking for a roblox api on the roblox wiki or such.

2 Likes

Unfortunately that’s for getting thumbnails and not for icons.

1 Like

Have you tried this plugin? https://www.roblox.com/library/2849322379/Imiji-convert-image-IDs

1 Like

You could team create with and alt and upload using that account

Everyone seems to be missing the point, I am attempting to load around 100 different game icons which can not be manually uploaded, as the games will gradually change. I have found a method to get a game’s icon but I am interested in finding alternate ways of doing it.

1 Like

I’m not sure if you’re talking about a proxy/redirect when you say “direct http requests”, but the following code works without a proxy.

local PLACEID = 1234089431

local Product = game:GetService("MarketplaceService")

local Details = Product:GetProductInfo(PLACEID)
local IconID = Details.IconImageAssetId

-- 2 examples
workspace.Part.Decal.Texture = "rbxassetid://"..IconID
workspace.Part2.Decal.Texture = "rbxthumb://type=Asset&id="..IconID.."&w=150&h=150"
32 Likes

I knew somebody would post it, that’s the method that I’ve been using.

2 Likes

You can also get the game icon using rbxthumb:

https://developer.roblox.com/en-us/articles/Content

1 Like

Note to get the image of a dev product, you also need to pass the second argument.

local ProductInfo = game.MarketplaceService:GetProductInfo(1788183968, Enum.InfoType.Product)
local img = "rbxassetid://" .. ProductInfo.IconImageAssetId