added function to load all of the images, and optimize them