optimize images and deflate