The medialibrary will shave off some kilobytes of the converted images by running them through a chain of various image optimization tools.
The optimization will only be applied on converted images, the package will not modify your original files. If you want to avoid optimization of a conversion just tack nonOptimized to the conversion.
JPGs will be made smaller by running them through JpegOptim. These options are used:
--strip-all: this strips out all text information such as comments and EXIF data
--all-progressive: this will make sure the resulting image is a progressive one, meaning it can be downloaded using multiple passes of progressively higher details.
PNGs will be made smaller by running them through two tools. The first one is Pngquant 2, a lossy PNG compressor. We set no extra options, their defaults are used. After that we run the image through a second one: Optipng. These options are used:
-i0: this will result in a non-interlaced, progressive scanned image
-o2: this set the optimization level to two (multiple IDAT compression trials)
SVGs will be minified by SVGO. SVGO's default configuration will be used, with the omission of the cleanupIDs plugin because that one is known to cause troubles when displaying multiple optimized SVGs on one page.