I created a plugin for a site I use in order to display images in page as opposed to opening them in a new tab.
Basic set up is that I use the DOM to get images, add it to an array, set them, and display them when needed.
It works pretty well, but it sometimes takes 2 to 4 seconds to load an image, and I'd rather it be a 1 second load at most.
I tried loading all images to the current pages html and then hiding them, and then revealing them when needed. This approach helped a lot, but its still a little too slow for my liking.
Is there any thing else I can do to load images faster?
Submitted July 10, 2017 at 06:22PM by RatherPleasent
via reddit http://ift.tt/2uKf1KT