I have a single page app built with HTML + JS + CSS.
I'm preloading all the images, they are definitely preloaded properly.
In my app, I need to be able to display an image for as low as 0.1 seconds and then immediately hide it, and the player needs to be able to tell what it was.
An image size can be up to 2MB.
The problem is, it seems it's not enough that the image is preloaded, it takes about 0.3 seconds just to fully render it (on an extremely new and strong computer).
How can I render it immediately? Perhaps by adding it to the DOM with visibility hidden a few seconds before it is displayed to the player or something of the sort?
Also, this article seems to be related to the question:
https://jack.ofspades.com/prefetching-preloading-and-prerendering-content-with-html/
Would that be a solution?
<link rel="prerender" href="/assets/images/big-image.jpg">
Should I just create a link object via JS for each image I'd like to prerender?