Shrinks image files inside the Worker. PNG is re-encoded in pure JavaScript with adaptive per-row filters and an LZ77/Huffman deflater (lossless), or reduced to an indexed palette of up to 256 colours (much smaller for graphics); in browsers the native PNG encoder is also tried and the smaller result wins. JPEG and WebP are re-encoded with a quality setting (JPEG flattened on a background), and any image can first be fitted inside a maximum dimension. The summary reports the before/after sizes. Everything runs locally.