Overall, image optimization is important for building a fast, responsive web design. The goal of image optimization is to reduce file sizes as much as possible to allow for fast loading times on web pages, while not losing any quality of the files or images on the site.
Lossy optimization compresses items significantly, but also gets rid of some of the data within the photos/videos/audio files. Lossless compresses items but maintains all of the data.
JPEG – JPEG is best used for digital photography and images with complex colors. JPEG stands for Joint Photographic Experts Group.
PNG – Most common default format for lossless compression. PNG stands for Portable Graphics Format.
GIF – GIF is a great format for lossless images with little color and even small animations. GIF stands for Graphic Interchange Format.