What is the best way of reducing the website loading time with lots of small images (eg menu buttons, image gallery thumbnails, masthead pics)? I am aware of ways of optimising the graphics to reduce the image file size, and making one big image where possible instead of several smaller ones. Has anyone any other tips? Eg has anyone tried CSS Sprites and if so is it any good / problem free?
You can implement caching method on your website using Apache .htaccess files on the Apache Web Server. This will reduce site loading time. Caching Images for a week as follows. <FilesMatch "\.(jpg|jpeg|png|gif|swf)$"> Header set Cache-Control "max-age=604800, public" </FilesMatch>
The best way is to try to set your images as background images using css. That way, your HTML will load and be displayed while your images are being loaded in the background. It worked rather well for me. Also, when possible, try to use jpg images instead of all other formats. Lastly, you could try using either interlaced gifs/ pngs or progressive jpgs - although the file size is a bit bigger, they're supposed to load faster.
Hi jj1, I use a pre-load script in my css that helps with multiple page loads like this... #LoadImages { width: 0px; height: 0px; display: inline; background-image: url(images/image.gif); background-image: url(images/image/jpg); background-image: url(images/image/png); } then call it in your html like this... <div id="LoadImages"></div> Seems to work good for me after the initial page has been loaded one time and caches for my menu buttons and graphics. Hope that helps.