Fastest way to preload/load large images
问题 Preload may not be the correct term... I have a page which loads a very large image. I wanted to wait for the large image to completly load before displaying on the page for the user. At the moment, I have a loading gif and i'm using javascript to wait for the image to load and then replace the loading gif src with the image: <img src="loading.gif" id="image" /> <script> img = 'very_large_image.jpg'; var newimg = new Image(); newimg.src = img; newimg.onload = function(){ $('#image').attr('src