Image optimization is a function of lossy and lossless compression. Differences in image formats are due to the difference in how and which lossy and lossless algorithms are used to optimize the image