1. A method for optimizing images of a web page on a network server, comprising: detecting a distance measure between the images in a reduced document object model (DOM) tree representation of the web page to determine the relationship among the images; in response to the determination of the distance measure relationship among the images, combining two or more related images into a combinational image; and updating the web page to replace references to the related images with a reference to the combinational image.