load images to memory