LeanImg

About LeanImg

LeanImg is a set of image tools that run inside your browser tab. Nothing is uploaded. Decoding, encoding and the machine learning models all execute on your own hardware. Don't take that on trust.

Privacy

Open your browser's network tab and drop a photo into the compressor. You'll see the page, the WebAssembly codec chunks and the three third-party scripts our privacy policy names: the Google AdSense loader, on pages in the languages we index, plus Vercel Analytics and Vercel Speed Insights, neither of which sets a cookie. Your image isn't in that list. This codebase has no API routes and no server actions. Past those three third-party scripts, every fetch our code makes is same-origin: the jSquash codec chunks under /_next/static/ plus the upscaler and background-removal models under /ml-assets/.

Code You Can Read

A network tab only proves the session you're watching. For the rest, read the code. Every engine that touches your pixels is published under AGPL-3.0 at github.com/low-battery-std/leanimg: compression, conversion, resize, crop, icon generation, background removal and upscaling. Open src/lib/compression/engine.ts and you'll find a File going in, a Blob coming out and no request between. AGPL-3.0 obliges anyone running it as a network service to publish their version.

How It Works

Each tool is a thin wrapper around a compiled library, and the image codecs reach your browser through jSquash. Here's what runs when you drop a file in.

  • MozJPEG encodes the JPEGs the compressor and converter write. The compressor reads the file's quantization tables to estimate the quality it was saved at, then scales your setting against that: a source at 60 with the slider on 80 comes out at 48.
  • OxiPNG makes a second pass at optimization level 3 over the PNGs the compressor and the converter write. That pass doesn't touch a pixel.
  • imagequant is the default route for PNG input in the compressor. It's a palette quantizer, so colors get discarded to shrink the file. The dropdown has a lossless option.
  • WebP covers most photo work, and smart mode encodes it at a flat quality 80. Nothing rescales that against the source the way the JPEG path does.
  • AVIF runs through @jsquash/avif at encoder speed 6 and 8 bits per channel, and smart mode targets quality 63.
  • ONNX Runtime Web runs the upscaler on realesr-general-x4v3, a Real-ESRGAN model, in 256-pixel tiles overlapping by 16. It only produces 4x, so the 2x option downscales on the way out.
  • @imgly/background-removal runs the background remover on the isnet model, sharing one ONNX Runtime build with the upscaler. Output is always PNG.
  • jsPDF writes the PDF conversions. The image inside the page is JPEG at quality 92, so a PNG converted to PDF picks up JPEG artifacts it didn't have before.
  • Canvas fallback catches a WebAssembly encoder that fails to load in the compressor or the converter, then reports whichever format came out. AVIF doesn't get one.

Where It Stops

Your device does the work, so its ceiling is ours. You'll see it first in the upscaler. With WebGPU on a desktop it takes 32 megapixels of input at 4x, streaming the result to disk band by band. Without it the cap falls to 1.1 megapixels on single-threaded WebAssembly. That's smaller than most phone photos.

Compressor, resizer, converter and background remover each take 10 files and 50 MB per batch. The icon generator won't take more than one file at 10 MB.

Why It's Free

Server-side processing costs money per image. That cost is what credits, watermarks and resolution tiers exist to recover. Hosting the page and the codec files is the whole bill here, and it doesn't grow with your fourth photo. Ads pay for it. That's the model.

The trade lands on your hardware. Your CPU or GPU does the encoding, so an old laptop grinds through a batch a server farm wouldn't notice. Close other tabs before a 4x run.

The Record So Far

LeanImg has been online since February 2026. What's countable:

  • Nine tools: compress, resize, crop, convert, icon generator, background remover, upscaler, image to text and PDF to text.
  • 24 conversion pairs across 11 formats, JPG to WebP through HEIC to JPG.
  • 25 interface languages.
  • Zero images received. The site stores what the privacy policy lists, and a streamed upscale leaves its result as one file in your browser's private storage, which a later run clears once it's more than 24 hours old.

Who Runs LeanImg

LeanImg is built and operated by Low Battery Studios (KVK 42081370), an independent studio in the Netherlands. Legal matters go to ask@lowbatterystudios.net. Support questions go to info@leanimg.com.

Contact

Bug reports and licensing questions go to info@leanimg.com. Technical issues can also go in the issue tracker. It's public.