A modern web application for compressing images using Django and Flask, with a beautiful UI powered by Tailwind CSS.
- Drag and drop image upload
- File selection upload
- Paste image support (Ctrl+V or right-click)
- Automatic image compression
- Before/After size comparison
- Download compressed images
- Modern, responsive UI with Tailwind CSS
.
├── frontend/ # Django application
│ ├── compress/ # Django app
│ ├── static/ # Static files
│ └── templates/ # HTML templates
├── backend/ # Flask microservice
│ └── api/ # API endpoints
├── requirements.txt # Python dependencies
└── README.md # This file
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up Django:
cd frontend python manage.py migrate python manage.py runserver -
Set up Flask backend:
cd backend python app.py -
Access the application:
- Frontend: http://localhost:8000
- Backend API: http://localhost:5000
- Django frontend runs on port 8000
- Flask backend runs on port 5000
- Tailwind CSS is used for styling
- Image compression is handled by Pillow
- Django 5.0.2
- Flask 3.0.2
- Tailwind CSS
- Pillow (PIL)
- Python 3.8+