Server-based compressors (TinyPNG, Compressor.io, Optimizilla) all follow the same pattern: your file is uploaded over HTTPS to the vendor's infrastructure, compressed there, and the result is downloaded back. The vendors state that uploaded files are deleted after a short window — typically an hour for TinyPNG, similar for the others — but you have to trust the policy and the operator. For one-off marketing PNGs that's usually fine. For anything containing customer data, internal screenshots, or work-in-progress design files, it's a meaningful exposure you didn't need to take.
Browser-based compressors avoid the problem mechanically rather than by policy. FileSlim and Squoosh both compile codecs (mozjpeg, libavif, oxipng, libjxl) to WebAssembly and run them inside the page. You can verify this yourself by opening DevTools → Network and watching: no request body containing your file bytes is sent. That's the same property end-to-end-encrypted messengers rely on — it's not promised, it's structural.
The trade-off is CPU: a 50-image batch on an underpowered laptop will use your fan, whereas TinyPNG's servers do that work invisibly. For most users on modern hardware the difference is a few seconds.