Skip to content

Sethispr/image-compressor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

120 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Image Compressor

image compressor web preview

Vite React WebAssembly jSquash

https://img-compress.pages.dev

Batch Image Compressor using WebAssembly (WASM). No ads, no trackers, no cookies, no signups.

Image Compressor Info

This image compressor is a fast, privacy first image compressor app that uses WebAssembly (wasm) and modern codecs to give near native compression speeds directly in your browser. This beats other sites that uses old JS based compression. By using local client side processing, this image compressor bypasses traditional upload limits and data privacy concerns while providing a highly customizable toolkit (image resizing, color reduction, lossless options, batch file renaming and more).

Website design inspired by Gleam

Compression Queue

The compressor gives you unlimited image compression queue and supports processing 10+ images all at once (customizable too)

batch image compression queue preview

Image Comparison

Mobile friendly image comparison shows a side by side view of the original and compressed image to check quality changes.

image compressor quality comparison


Prerequisites

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

Development Setup

This project uses Vite + React and WebAssembly (wasm) provided by jSquash, their codecs are from the Squoosh app.

Follow these steps to get the project running locally:

  1. Clone the Repo
git clone https://github.com/Sethispr/image-compressor.git
  1. Change Directory
cd image-compressor
  1. Install Dependencies
npm install
  1. Run Development Server
npm run dev

Once the server starts, click the local link shown in your terminal (usually http://localhost:5173) to view the site live.

More info on contributing is available over here


Self Hosting

You can host this application yourself using Docker. This method is so the app runs in a consistent environment using a ready Nginx server. If you want your project to be seen by everyone, you need to have a domain name that points to your local machine, and then proxy it to port of this machine, you can use something like Nginx.

Prerequisites

  • Docker installed on your system.

Docker CLI

  1. Build the image: Navigate to the project root and run:
docker build -t image-compressor .
  1. Run the container:
docker run -d -p 8080:80 image-compressor

The app will now be at http://localhost:8080.

Configuration Notes

  • Port Mapping: You can change the port by modifying the first number in the port mapping (ex: -p 3000:80 will serve app on port 3000).
  • Routing: The included Nginx configuration handles Single Page Application (SPA) routing, so refreshing the page on sub routes will work correctly.
  • Updates: To update your self hosted instance, pull the latest code from the repository and rebuild the image using the build command above.

If you find any issues during the setup process, please feel free to open an issue in the repository.


Support this project
If you find this tool useful, please consider giving it a star!

yield stars

About

Fast, private, batch image compressor website (WebAssembly)

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Languages