Sponsored Content

DEV Community

Mehdi Tareghi
Mehdi Tareghi

Posted on Originally published at assetmelt.com

I wanted Squoosh with batch and a KB budget, so I built a client-side compressor

I compress images for websites, side projects, and client work. For years that meant TinyPNG or Squoosh. Neither matched how I actually work.

TinyPNG is fast and familiar. It also wants the file. You upload. The free web tool caps you at 20 images per session and 5 MB each. After that you pay, wait, or split a folder into batches of twenty. The compression is fine. The trust model is โ€œsomeone elseโ€™s server, hope they delete it.โ€ I did not want that for client photos, UI screenshots, or anything I would not put on a public CDN first.

Squoosh is the other extreme, and I still use it for one picture. Drop a file, pick MozJPEG / WebP / AVIF / JXL / Oxipng, compare sides, download. The image never leaves the browser. That part is right. The workflow is not: one file at a time, no folder drop, no ZIP, no โ€œmake this under 100 KB.โ€ The CLI and library were deprecated years ago. The web app still works; it is not where I go when a public/images folder lands on my desk.

I am Mehdi Tareghi. I build software from Iran. I got tired of the gap and built Asset Melt: Squoosh-grade WASM codecs, plus the batch and budget pieces I kept missing.

What it does

Studio is a static app. Open it, drop files, encode on your machine, download. No account.

Codecs run in Web Workers via WebAssembly: MozJPEG, AVIF, WebP, Oxipng, and JPEG XL (plus QOI). HEIC from a camera roll decodes locally with libheif. PNG is lossless Oxipng by default, with optional palette reduction when you want lossy PNG-8.

The parts I built because Squoosh would not:

  • Batch and folders. Drop a directory. Nested images are walked; non-images are skipped. The queue is reorderable. You can add files while a batch is encoding, pause mid-run, and export a ZIP that keeps relative paths (products/a/hero.webp). There is no 20-image cap. Device memory is the cap.
  • A KB budget. โ€œQuality 75โ€ is not a size. I often need under 50 KB, under 100 KB, or under 200 KB for an OG image, a newsletter hero, or a card. Studio binary-searches quality (and PNG palette size) against that cap for JPEG, WebP, AVIF, and JXL.
  • Platform kits. Fit-to-size presets for OG, X, Instagram, YouTube, favicon, App Store screenshots, and newsletter widths โ€” as ZIPs, not a scavenger hunt through a resize panel.

You can also export more than one format in a single run (AVIF / WebP / optional JPEG). Recipes live in the URL (?recipe=); photos do not. Code is at github.com/mehditareghi/assetmelt.

Images stay on the device. The site is not invisible.

Image bytes never upload. There is no image API. I cannot see, store, or recover your files. Close the tab and in-progress work is gone unless you exported. That is architecture, not a footer promise.

The site still has UI analytics. I use Google Analytics 4 for page views and coarse events (files added, processing finished, export โ€” counts and formats, not filenames or pixels). Sentry gets crashes, traces, and sampled session replay of the website chrome, not your pictures: media is blocked, Studio previews are local blob URLs. Vercel records web vitals. It is all on assetmelt.com/privacy. If a privacy pitch hides telemetry, it is a lie. This one does not.

Try it in about 20 seconds

  1. Open assetmelt.com/studio. No signup.
  2. Drop a JPEG, a PNG, or a whole folder.
  3. Pick WebP or AVIF, or turn on a size budget โ€” under 100 KB is a good first test.
  4. Process (Cmd/Ctrl+Enter).
  5. Download the file, or ZIP the queue.

If you already know the cap, these open Studio with the budget on: under 50 KB, under 100 KB, under 200 KB.

First load pulls WASM modules. After that, work is local CPU. A cheap laptop will feel a large AVIF batch. That is expected.

Squoosh vs TinyPNG vs Asset Melt

Features only. No invented traffic numbers, no โ€œX% smallerโ€ claims.

Squoosh TinyPNG (free web) Asset Melt
Where encoding runs Your browser (WASM) Tinifyโ€™s servers (upload) Your browser (WASM)
Account No Not required for the free web tool No
Batch One image at a time Up to 20 images / session, 5 MB each Folder drop, queue, ZIP; RAM is the limit
Hit a KB target Quality / codec sliders Automatic compression, no โ€œunder N KBโ€ budget Binary-search under 50 / 100 / 200 KB
Codecs / formats MozJPEG, WebP, AVIF, JXL, Oxipng, QOI, WP2 JPEG, PNG, WebP, AVIF MozJPEG, WebP, AVIF, Oxipng, JXL, QOI; HEIC decode
Platform kits (OG, X, App Store, โ€ฆ) No Resize via paid / API, not kit ZIPs Yes
Open source Yes No Yes
Images uploaded No Yes No
Site analytics Yes (Google Analytics on the app) Yes (it is a hosted service) Yes โ€” UI only, disclosed on /privacy

TinyPNG is still the right choice if you want a hosted API, a WordPress plugin, or you are fine uploading and staying inside the free 20. Squoosh is still the right choice if you want a side-by-side codec lab for one file. I use both as references. I built Asset Melt for the days I have a folder, a size cap, and no reason to send pixels off-device.

I did not write MozJPEG. I wired the same family of engines Squoosh proved in the browser (@jsquash, libheif) into a React app, then added a queue, a budget search, and the export paths I kept wishing existed. There is no cloud history and no team workspace โ€” there is no backend that receives photos. It is free. No plan page.

If that is the workflow you already have in your head โ€” batch, a KB number, files that stay put โ€” open the studio and drop something.

Top comments (0)