Optomizing the images