How to search for images using roproxy instead of decals

It only provides a 420X420 thumbnail of the decal, i want it to provide the full quality image in the proper aspect ratio

local event = game.ReplicatedStorage.BearChat.UpdateImageSearch -- remote event
local httpservice = game:GetService("HttpService")

event.OnServerEvent:Connect(function(player,Text,Value) -- text is the textbox text (keywords), value is the sort type #
	
	local gui = player.PlayerGui.PopUps.Phone.Screen.Images

	local url = "https://search.roproxy.com/catalog/json?CatalogContext=2&Category=8&SortType="..Value.."&Keyword="..Text
	local result = httpservice:GetAsync(url)
	local decode = httpservice:JSONDecode(result)
	
	local children = gui.SearchQuery:GetChildren()
	for i,v in ipairs(children) do
		if v.ClassName == "Frame" then
			v:Destroy() -- destroys items from previous search
		end
	end
	
	for i,v in ipairs(decode) do
		
		local image = game.ReplicatedStorage.Phone.Image:Clone()
		image.Parent = gui.SearchQuery
		local newstring = string.format("rbxthumb://type=Asset&id=%s&w=420&h=420", v.AssetId)
		image.Image.Image = newstring
		
	end
end)
1 Like

local newstring = string.format("rbxthumb://type=Asset&id=%s", v.AssetId) just get rid of the w & h Params and it will load the max quality of image

1 Like

its not working, should i change rbxthumb to something else?

1 Like

Oh right, try changing it to rbxassetid:// and edit it to look like this: ://type=Asset&id=%s

1 Like

Screen Shot 2022-01-13 at 9.17.06 PM

Updated my post. Please look at it.

1 Like

ya it still does not work sorry

Hmm, not sure than.

Charrrrrrrrrrrrrrrrrs

1 Like

I tried this and it says asset type doesnt match requested type but it does get the id correctly

local newstring = string.format("rbxassetid://%s", v.AssetId)
1 Like