Back to All Learning Guides
Web Performance & Engineering•7 min read•Updated Oct 2026

How In-Browser Image Processing Works (HTML5 Canvas, OffscreenCanvas, and Web Workers)

Discover how modern web browsers process images locally using createImageBitmap, OffscreenCanvas, and multi-threaded Web Workers without UI lag.

S
Squeeze Technical Architecture Team

Zero-Upload Client Architecture Research

AEO Answer Island • In-Browser Architecture

Modern browsers can convert and compress images locally without server uploads by utilizing OffscreenCanvas and multi-threaded Web Workers. Web Workers execute heavy pixel calculations and SSIM algorithms asynchronously in background threads, keeping the browser UI completely responsive (60fps) while processing multi-file batch queues in device RAM.

1. The Legacy Paradigm: Sending Uploads to Cloud Servers

Traditional conversion sites require uploading multi-megabyte files across the internet to an AWS EC2 instance running ImageMagick or Sharp. This creates latency, network bottlenecks, and privacy liabilities.

2. The Modern Trio: createImageBitmap, OffscreenCanvas, and Workers

Modern JavaScript provides everything necessary for high-performance image processing:

  • createImageBitmap(): Decodes image files directly from Blobs asynchronously off the main thread.
  • OffscreenCanvas: Allows canvas rendering operations (drawing, filtering, resizing) inside Web Workers without touching the DOM.
  • Web Workers: Background threads that handle intensive loops without dropping UI frames.

3. The Architecture of Squeeze

Squeeze dispatches conversion tasks to a pool of background Web Workers matching your CPU core count (navigator.hardwareConcurrency). Each worker handles an image in parallel:

  1. The source file is read as an ArrayBuffer.
  2. Pixels are decoded and rescaled via bicubic canvas operations.
  3. Mathematical SSIM quality scoring checks perceptual fidelity.
  4. The target format Blob is produced and bundled into a ZIP archive using JSZip.

Experience In-Browser Speed

Authoritative References

Squeeze Image Engine

Ready to convert or compress images with 100% privacy?

Experience zero server uploads. All WebP, PNG, JPG, SVG, and multi-resolution ICO conversions run entirely inside your browser using sandboxed Web Workers.