Bundle files and folders into optimized ZIP archives to save storage space.
Image compression fundamentally falls into two categories: Lossless and Lossy.
Lossless formats (like PNG) find clever mathematical ways to store data without throwing a single pixel away. Lossy formats (like JPEG or WebP on low settings) aggressively delete visual information that human eyes struggle to notice, drastically reducing file size at the cost of microscopic detail.
When you compress a JPEG, the algorithm splits the image into 8x8 pixel blocks. It then uses the Discrete Cosine Transform (DCT) to analyze the frequencies of colors within that block.
Humans are very bad at seeing fine details in bright areas (high frequency), but very good at seeing broad changes in color (low frequency). The compression algorithm permanently deletes the high-frequency data. This is why highly compressed JPEGs look "blocky" or have strange rings around sharp edges (called compression artifacts).
Compressing high-resolution images is mathematically expensive. Previously, this required uploading files to a cloud server to run backend tools like ImageMagick.
Today, we can tap into the browser's native C++ rendering engine using OffscreenCanvas. When you click compress, the browser's own highly optimized encoders execute the DCT math locally in milliseconds, entirely offline.
Why does an image get smaller when you lower the JPEG quality?