#privacy · #compression · #browser

How to compress images without uploading them

Compress, resize and convert images locally in the browser. Here is what actually happens to your files, what stays on your device, and where the limits are.

· 4 min read · LitPhoto

Most online compressors ask you to upload a file, wait for a server to re-encode it, and then download the result. LitPhoto takes a different route: the image is decoded, resized and encoded inside your browser, and the original never leaves your disk.

This guide explains the exact processing path, what the app stores locally, and the practical limits you should know before dropping a large batch.

The short answer

Drop an image, choose a target quality or a target file size, optionally pick an output format, and download the result. The browser does the work. There is no upload endpoint in the application, no account, and no analytics script in the current build.

What happens after you drop a file

  1. The file is read into memory as an ArrayBuffer.
  2. A Web Worker passes it to the image engine. The engine sniffs the real format from the bytes, not just the extension.
  3. The decoder produces pixel data. Depending on the source, that is a native browser decoder or a bundled WebAssembly codec.
  4. If resizing is enabled, the pixels are scaled before encoding.
  5. The selected encoder writes a new file: JPEG, PNG, WebP, AVIF, JPEG XL, or one of the professional formats handled by ImageMagick WASM.
  6. The result is returned as a Blob and offered as a download. A preview is created from an object URL on your device.

At no point does the file content need to be sent to a remote server. The page may still load same-origin assets such as the WebAssembly encoder or a font file; those are code and assets, not your image.

What stays on your device

  • Image data: held in browser memory while the job is running, then passed to the download. It is not persisted by the app.
  • Preview URLs: temporary blob: URLs that are revoked when a row is removed or the queue is cleared.
  • Settings: the image panel stores quality, target size, format, resize, metadata and background preferences in localStorage under litphoto-settings-v1.
  • Mode and appearance: the image/video mode, locale and theme can also be remembered in local storage.
  • Cache: the service worker caches the app shell and same-origin assets so the tool can reopen offline. It does not cache your source files as app data.

Closing the tab ends the in-memory queue. Downloaded files are ordinary local files and stay wherever your browser saves them.

Quality mode vs target size

LitPhoto offers two ways to choose the output size:

  • Smart quality runs a small quality ladder and picks the lowest setting that stays visually faithful. The slider acts as a ceiling.
  • Target size searches for a quality that fits a byte budget. It is useful when a form or a platform imposes a limit.

Not every format has a useful quality dial. TIFF, BMP, ICO, SVG and similar targets use a fixed quality; the interface hides target-size search for those formats instead of pretending it can converge.

Practical limits

  • The image engine rejects files above 80 megapixels by default. That is a deliberate guard against exhausting browser memory.
  • Very large batches compete for the same worker pool and the same RAM. Compress in smaller groups if the browser becomes sluggish.
  • The first conversion to a professional format can download an ImageMagick WASM engine of roughly 15 MB. Later jobs reuse the cached engine.
  • Offline support covers the app shell and previously loaded engines. A format that has never been used may still need a network connection the first time.

A quick privacy check you can run yourself

Open the browser developer tools, switch to the Network panel, and drop an image. You should see same-origin requests for the app and codec assets, not a multipart upload containing your file. If a third-party analytics or upload request appears, that is not part of this build.

One honest caveat: the static server that hosts the page can keep ordinary access logs (IP address, user agent, requested URL) when you load the site. Those logs are a hosting concern, not an image-upload path. The application itself has no upload request.

When local compression is the right choice

Local processing is a good fit when the files are private, when you need a quick batch on a laptop, or when you want to keep working without an account. It is not a replacement for a full desktop image editor: it does not remove objects, retouch faces or recover detail that was never captured. It compresses, resizes and converts — and it does that without taking your files.

Try it locally

Every file is processed on your device. No uploads, no account, no tracking.
Open LitPhoto →