Thx JC… that made ./img.png in Firefox… work for me.
var image = new BABYLON.GUI.Image("but", "./img.png");
And thx for the url/not-url correction, too. Hope you’re well. Viche, are you rolling? Hope so.
Viche… CORS can get in the way of your any url idea (as RaananW mentioned)… so… here’s what I do… sometimes…
That is a tinyUrl version of a Google IMAGE search for cow and wikimedia (at same time) with TOOLS tab set-to “Labeled For ReUse”. Generally, all wikimedia images are CORS-clear (and I hear Facebook images are, as well, and surely some others).
Let’s try that first cow-pie… err… I mean cow-pic. Into the playground we go (the playground needs CORS-cleared images, too) https://www.babylonjs-playground.com/#XCPP9Y#2278
As Jami Gertz stated… in the movie Twister… “We got cows”
Change the word cow to ANY other search term… and you should be returned a pile of CORS-clear (Labeled for ReUse) images.