
Research
/Security News
737 Chrome VPN Extensions Linked to Brand Impersonation and Browser Traffic Redirection
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.
@cleanor/browser-image-tools
Advanced tools
Privacy-first image processing in the browser: convert, compress and encode PNG, JPEG, WebP, AVIF, GIF and ICO entirely on the client. Files never leave the device.
Privacy-first image processing that runs entirely in the browser. Convert, compress, resize and encode PNG, JPEG, WebP, AVIF, GIF and ICO on the client using Canvas and WebAssembly. The bytes never leave the device — there is no server, no upload, no API key.
🔒 These are the exact modules powering the free tools at cleanor.app/tools — run them yourself, no backend required.
Most "image optimizer" libraries either run on a server (your users' photos leave their machine) or wrap a single codec. This is the whole client-side image pipeline Cleanor ships — decode, analyze, transform, and re-encode across formats — with nothing sent anywhere. Ideal for privacy-sensitive apps, offline PWAs, and anywhere you don't want to pay for or operate an image backend.
Framework-agnostic: works with React, Vue, Svelte, or plain <script type="module">.
Each namespace below backs a live, no-signup tool you can try in your browser:
| Do this | Live tool |
|---|---|
| AVIF → JPG / PNG / WebP | avif-to-jpg · avif-to-png · avif-to-webp |
| PNG → WebP | png-to-webp |
| Recompress AVIF | avif-compressor |
| Build animated WebP | animated-webp-maker |
| Generate an app-icon pack | app-icon-pack-generator |
npm install @cleanor/browser-image-tools
This package pulls in WebAssembly codecs (@jsquash/jpeg, @ffmpeg/ffmpeg) via a @jsr dependency, so add this once to your .npmrc:
@jsr:registry=https://npm.jsr.io
Shared helpers are top-level; each format lives in its own namespace.
import { avif, ico, webp, gif, loadImageElementFromBlob, formatFileSize } from '@cleanor/browser-image-tools';
// AVIF → JPEG, fully in the browser
const jpegBlob = await avif.convertAvifToJpg({ file: avifFile, quality: 90 });
// Build a multi-resolution .ico from any image
const img = await loadImageElementFromBlob(pngFile);
const icoBlob = await ico.buildIcoBlob(img, [16, 32, 48, 256]);
// Re-encode / shrink a WebP (incl. animated) with a preset
const smaller = await webp.optimizeWebp({ file: webpFile, preset: 'smaller', fpsCap: null });
// Optimize a GIF
const gifOut = await gif.optimizeGif({ file: gifFile, loopCount: 0, fpsCap: 15 });
console.log('saved to', formatFileSize(jpegBlob.size));
Everything is fully typed — explore the API through your editor's autocomplete on each namespace.
| Namespace | Highlights |
|---|---|
png | decode/encode, palette + alpha analysis, animated PNG (APNG), zip bundling |
jpg | JPEG/HEIC detection, structure inspection, encode via WASM |
webp | metadata, animated WebP decode/encode, video→WebP, optimizeWebp |
avif | decode, and convert AVIF → JPG / PNG / WebP |
gif | frame extraction, encode, optimizeGif, resizeGif (ffmpeg.wasm) |
gifEncoder | low-level GIF encoder |
ico | buildIcoBlob, multi-size .ico encoding |
effects | image effect filters |
convolution | convolution kernels (blur/sharpen/edge) |
| top-level | canvas helpers, loadRasterImage, color utils, formatFileSize, download helpers |
HTMLCanvasElement, createImageBitmap, URL.createObjectURL, and WASM. They are not meant for Node.@ffmpeg/ffmpeg, @jsquash/jpeg) are kept external so your bundler can code-split and lazy-load them. Only the format namespaces you import pull their deps in.ffmpeg.wasm on first use.Issues and PRs welcome — bug fixes, new format helpers, and framework examples (React/Vue/Svelte hooks) especially. Build and typecheck before opening a PR:
npm install
npm run typecheck
npm run build
MIT © Cleanor Labs. More open data and tools at cleanor.app/research and cleanor.app/tools.
FAQs
Privacy-first image processing in the browser: convert, compress and encode PNG, JPEG, WebP, AVIF, GIF and ICO entirely on the client. Files never leave the device.
The npm package @cleanor/browser-image-tools receives a total of 10 weekly downloads. As such, @cleanor/browser-image-tools popularity was classified as not popular.
We found that @cleanor/browser-image-tools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.