From the URL @GGGGG14 posted (https://catalog.roblox.com/docs#/) it seems as though there is no native Thumbnail ID get request for bundles.
However you can use the https://catalog.roblox.com/v1/bundles/429/details URL to get a table of information of all the limbs inside of that bundle, and then use LoadAsset to insert each limb from the “Items” directory of the table. (Table[‘items’][1][‘id’] in your case would return 2608534881, or the left arm. From there you could use Module3D or in the future use ViewportFrames to get a thumbnail of this.
Although this seems like a very resource intensive process just to get a bundle thumbnail, and we would definitely need API (having said that, there’s probably some around somewhere)
This would be even trickier to use the API as stated above as you can’t use ‘Get’ requests on Roblox websites from a Roblox Server…
Going by the solutions stated above, here’s a simple implementation that uses ViewportFrame to generate the bundle’s image. Though for it to be accurate, you’ll want to take into account of the animations provided in the bundle, as well as applying the bundle assets onto a R15 character using Humanoid | Documentation - Roblox Creator Hub and diverse other methods.
GetBundleImage (ModuleScript) - This loads the bundle assets & makes the ViewportFrame
Script - This script calls GetBundleImage on bundle 429, and puts it somewhere for the client to see
LocalScript - This script finds the generated ViewportFrame and handles the camera setup, showing the generated ViewportFrame to the client (cameras don’t seem to replicate, eh).
I noticed that this doesn’t take into account the head of the bundle, as the head is a SpecialMesh instead of a MeshPart… Not sure how you’d fix that.
edit: This solution is only viable when the ViewportFrame goes live for real games, and not just Studio, although I don’t think that will be too long of a wait.
Thank you @As8D. I really appreciate you putting together a working demo. I’ve learned a lot from your example since I’ve never used viewport frames before.
That being said, I should have included some more details. These images are for an avatar editor where hundreds of bundles are displayed at once. I’m worried that inserting all these models and rendering them would be laggy on mobile devices.
The most performant solution would be using an image url, such as https://www.roblox.com/asset-thumbnail, except for bundles. Unfortunately, we haven’t been able to find a publically exposed URL yet. But perhaps someone will know
Thank you @GGGGG14@AyeeAndrxw for your suggestions as well!
That’s for an outfit though… Not sure how that would be applied to your use case. Is there a way to get the outfit ID of a bundle?
I saw that earlier, and if you have the Robux to do it, you could create a bunch of outfits that are just the bundle and use that API to get the image id.
On a sidenote, you’d need to use a proxy server of some sorts as you can’t use Get Requests from a Roblox Server.
You can get the outfit using game:GetService(“AssetService”):GetBundleDetailsAsync(429)
Also you can plug that image URL directly into a ImageLabel. You would have to scrape the catalog using an external tool to first get the items. But you could just save those in a modulescript
Aha, I had a look at AssetService but there was no documentation on the GetBundleDetailsAsync dictionary it returns… I didn’t actually know that you could plug the image URL directly into a ImageLabel, that’s pretty neat.
Overall though, this is a shortterm answer - in the future there should be a more viable option available which only requires one request to Roblox to get the image id, but for now… This is about as good as it gets
local AssetS = game:GetService("AssetService")
for i,v in pairs(AssetS:GetBundleDetailsAsync(429)) do
print(i,v)
if typeof(v) == 'table' then
for ii,vv in pairs(v) do
print(' ',ii,vv)
for iii,vvv in pairs(vv) do
print(' ',iii,vvv)
end
end
end
end
Output
Items table: 481ABF38
1 table: 481ABF68
Id 2608534881
Type Asset
Name Magma Fiend - Left Arm
2 table: 481ABFC8
Id 2608536258
Type Asset
Name Magma Fiend - Left Leg
3 table: 481ABC38
Id 2608537440
Type Asset
Name Magma Fiend - Right Arm
4 table: 481ABB78
Id 2608538559
Type Asset
Name Magma Fiend - Right Leg
5 table: 481ABFF8
Id 2608539495
Type Asset
Name Magma Fiend - Torso
6 table: 481AC028
Id 2608540431
Type Asset
Name Magma Fiend - Head
7 table: 481ABED8
Id 2510230574
Type Asset
Name Rthro Climb
8 table: 481ABD58
Id 2510233257
Type Asset
Name Rthro Fall
9 table: 481AC058
Id 2510235063
Type Asset
Name Rthro Idle
10 table: 481ABE18
Id 2510236649
Type Asset
Name Rthro Jump
11 table: 481ABE78
Id 2510238627
Type Asset
Name Rthro Run
12 table: 481AC4A8
Id 2510240941
Type Asset
Name Rthro Swim
13 table: 481AC1A8
Id 2510242378
Type Asset
Name Rthro Walk
14 table: 481AC118
Id 474312030 -- You use this for "https://roblox.com/outfit-thumbnail/image?userOutfitId= ID HERE &width=420&height=420&format=png"
Type UserOutfit
Name Magma Fiend
Description He's got hot blood, with a temperature of nine hundred and three.
Id 429
Name Magma Fiend
BundleType BodyParts