How do I add an image to the scene from a url?

I am trying to load an image from a url then put it on the screen for the background of my game.

local function setBackground(image)
	
    --display image on screen here

end
local function http_result(self, id, response)
    setBackground(image.load(response.response))
end
function init(self)
    http.request("http://example.com/image.png", "GET", http_result)
end

Any idea how to do this? Thanks in advance.

You can currently only do this for gui box nodes. At some point we will add support for sprites as well, but for now it’s only gui box nodes. In your case it seems like it would be fine to do this using box nodes though. If you want to check out an example then please have a look here: https://github.com/britzl/publicexamples/blob/master/examples/loadtexture/loadtexture.gui_script