I have a preload link in my html.
<link rel="preload" href="sprite.png" id="mySprite" as="image">
How can I convert this to a Image
in Javascript?
(let sprite = new Image(myPreloadeImageFromHTML)
I have a lot of images needed, but they do not load on time, which results in no images shown.
How can I preload it and obtain it in Javscript as an Image
using a <link rel="preload">
?