Ad

How Can I Reduce The File Size Of Large Images To Improve Page Load Time?

- 1 answer

I have the following images/slides on the home page of my website;

Home page: https://www.atlasestateagents.co.uk/

Images:

https://www.atlasestateagents.co.uk/img/Liverpool-Slide.png

https://www.atlasestateagents.co.uk/img/Landlord-Slide.png

https://www.atlasestateagents.co.uk/img/Vendor-Slide.png

Having used some online SEO tools I can see they are considerably adding to the page load time which apparently can have a negative affect on SEO performance.

The images have to be large in size as the site uses the Bootstrap framework and scales up/down depending on screen size.

Is there anything I can do to reduce the file size and/or load time?

Ad

Answer

File Types

The first and simplest thing to consider when optimizing images is file type. Certain image file types are better suited for specific images. For example, JPGs are best suited for photographic images. PNGs, on the other hand, are best suited for simple images with few colors or for images using transparency. 24-bit PNGs are best suited for images containing both photographic elements and simple graphics. 8-bit PNGs can further reduce file size in images with fewer than 256 colors.

Sprites and Preloaders

A helpful practice for reducing load time is the use of CSS sprites, which are CSS codes that display a piece of a larger image. This technique is often employed for mouse-over states on buttons. For example, with a sprite you can display a piece of an image as a button on your site and display a different piece of that image as the button whenever a user mouses over it.

Though sprites are frequently used for interactive menus and buttons, they can also be used to display multiple site images from a single image file. This would require the browser to only download one image instead of, say, three or four.

In addition to sprites, images can be preloaded using JavaScript, jQuery, Ajax, or CSS. When an image is preloaded, the browser downloads or “preloads” the image and then instantly displays it wsed for interactive menus and buttons, they can also be used to display multiple site images from a single image file. This would require the browser to only download one image instead of, say, three or four.

In addition to sprites, images can be preloaded using JavaScript, jQuery, Ajax, or CSS. When an image is preloaded, the browser downloads or “preloads” the image and then instantly displays it when the user goes to access it. Preloading can greatly decrease load times with image heavy websites, especially sites with photo galleries.

Using CSS Instead of Images

Sometimes the best way to decrease image load time is not to use an image at all. Improvements to CSS have made it possible for the browser to render certain “images” using pure CSS. It is now possible to generate rounded rectangles, gradients, drop shadows, and transparent images using CSS. Be warned, every browser won’t always support these techniques and browser compatibility should be carefully considered before replacing an image with CSS.

Suggesting some good reads on image optimization and reducing load time if using images.

http://www.getsnappy.com/web-optimization/improving-page-load-times.html

http://www.monitis.com/blog/2011/05/29/30-tips-to-optimize-htmlcssimages-for-smooth-web-experience

http://www.practicalecommerce.com/articles/3354-Optimizing-Images-to-Reduce-Load-Times

Do Images Load Faster in HTML or CSS?

Ad
source: stackoverflow.com
Ad