Optimize images using lossless compression