JPG (JPEG) uses lossy compression, meaning it reduces file size by removing some image data that the human eye typically doesn't notice. This is different from lossless compression formats like PNG, which preserve all original data.
How JPG Compression Works
When you compress a JPG image, the algorithm analyzes the image in 8x8 pixel blocks and applies a mathematical transformation called Discrete Cosine Transform (DCT). It then reduces the precision of color information that humans are less sensitive to, particularly in areas with gradual color changes.
Quality vs File Size Trade-off
The quality slider controls how much data is removed during compression. Lower quality means more data is removed, resulting in smaller files but potentially visible artifacts like blurring or blocking. Higher quality preserves more detail but produces larger files.
Best Practice: Always keep your original uncompressed images. JPG compression is irreversible - you cannot recover lost quality after compression.