This is a Flask-based web application that allows users to upload images, compress them to a .jpg
format, and then download the compressed image. The app is containerized using Docker for easy deployment.
.png
, .jpg
, or .jpeg
formats.jpg
format with reduced qualityTo run this project locally, you'll need the following installed:
To clone this project to your local machine, run:
git clone https://github.com/YogiCodersRealm/ImageCompressor.git
cd ImageCompressor ```
### 2. Build the Docker Image
In the root of the project directory, build the Docker image using the following command:
```bash
docker build -t image_compressor .
To run the app in Docker, use this command:
docker run -p 5000:5000 -v $(pwd)/app/uploads:/app/uploads -v $(pwd)/app/compressed:/app/compressed image_compressor
This will bind the Flask app to localhost:5000, and mount the uploads and compressed directories to ensure files are saved in your local file system.
Once the container is running, you can access the app by navigating to the following URL in your web browser:
http://localhost:5000