Squish: Batch Browser-based Image Compression with WebAssembly

Squish: Batch Browser-based Image Compression with WebAssembly

Summary

Squish is an innovative, browser-based image compression tool that leverages WebAssembly for high-performance optimization directly in your browser. It supports a wide array of formats including AVIF, JPEG, JPEG XL, PNG, and WebP, offering features like batch processing, format conversion, and real-time previews through an intuitive drag-and-drop interface. This tool provides a private and efficient way to optimize images without server uploads.

Repository Info

Updated on January 26, 2026
View on GitHub

Introduction

Squish is an innovative, browser-based image compression tool designed for efficient and high-performance image optimization. Developed by Addy Osmani, it leverages WebAssembly to perform image processing directly within your browser, eliminating the need for server uploads and ensuring privacy. Squish supports a comprehensive range of modern image formats, including AVIF, JPEG, JPEG XL, PNG, and WebP, making it a versatile solution for web developers and content creators alike.

Installation

To get Squish up and running for development or local use, follow these steps.

Prerequisites

  • Node.js 18 or later
  • npm 7 or later

Steps

  1. Clone the repository:
    git clone https://github.com/addyosmani/squish.git
    cd squish
    
  2. Install dependencies:
    npm install
    
  3. Start the development server:
    npm run dev
    
  4. Build for production:
    npm run build
    

Examples (Usage)

Using Squish is straightforward, thanks to its intuitive drag-and-drop interface.

  1. Drop or Select Images: Drag and drop your images onto the designated upload area, or click to browse and select files from your system.
  2. Choose Output Format: Select your desired output format from the available options: AVIF, JPEG, JPEG XL, PNG, or WebP.
  3. Adjust Quality: Utilize the quality slider to fine-tune the balance between file size and image quality for each format.
  4. Download: Download individual optimized images, or use the "Download All" button for convenient batch downloads.

Why Use Squish

Squish stands out as a powerful image compression tool due to several key advantages:

  • Browser-Based & Private: All processing happens client-side, meaning your images never leave your browser, ensuring privacy and security.
  • High Performance: By utilizing WebAssembly, Squish achieves near-native speed for image processing, making optimization fast and efficient.
  • Batch Processing: Optimize multiple images simultaneously, significantly saving time and effort.
  • Extensive Format Support: Supports modern and widely used formats like AVIF, JPEG, JPEG XL, PNG, and WebP, along with format conversion capabilities.
  • Intuitive User Interface: A drag-and-drop interface, real-time preview, and size reduction statistics provide a seamless user experience.

Links