Skip to content

Repository files navigation

Image-Size-Reducer

A powerful tool for batch reducing and optimizing image and video file sizes while maintaining quality. Built with Python and Jupyter Notebooks for ease of use and transparency.

📋 Features

  • Image Compression: Reduce image file sizes without significant quality loss
  • Video Support: Compress and optimize video files
  • Batch Processing: Process multiple files at once
  • Flexible Options: Customize compression levels and output formats
  • File Organization: Organize files by creation date
  • Progress Tracking: Real-time progress updates during processing

📁 Project Structure

.
├── README.md                                      # This file
├── .gitignore                                     # Git ignore rules
├── .gitattributes                                 # Git attributes for proper handling
├── compress_media.ipynb                           # Main notebook for compression (current version)
├── organize_by_date.ipynb                         # Utility notebook for file organization
├── Images/                                        # Input images directory (create this folder)
├── Output/                                        # Processed/output files directory
└── Others/                                        # Archive of previous versions
    ├── Image Size reducer-Final.ipynb
    ├── Image Size reducer-2025(with Vid support)-Copy1.ipynb
    ├── Size Reducer - prod - (with Vid support).ipynb
    ├── Image Size reducer-Copy2.ipynb
    └── Image Size reducer.ipynb

🚀 Getting Started

Prerequisites

  • Python 3.7+
  • Jupyter Notebook or JupyterLab
  • Required Python packages (see notebook dependencies)

Installation

  1. Clone the repository:
git clone <repository-url>
cd "Image-Size-Reducer"
  1. Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install required packages:
pip install -r requirements.txt  # If available
  1. Launch Jupyter Notebook:
jupyter notebook

Usage

Image & Video Compression

  1. Open compress_media.ipynb
  2. Create an Images/ folder and place your images/videos inside
  3. Run the notebook cells following the instructions
  4. Processed files will be saved to the Output/ directory

File Organization

  1. Open organize_by_date.ipynb
  2. Ensure you have an Images/ folder with files inside
  3. Follow the instructions to organize files by their creation date
  4. Files will be organized in year/month subdirectories

📝 Notebooks Guide

Notebook Purpose Status
compress_media.ipynb Main compression tool with video support ✅ Current
organize_by_date.ipynb File organization utility ✅ Active
Archive versions (in Others/) Previous implementations for reference 📦 Archive

⚙️ Configuration

Edit the notebook parameters to customize:

  • Compression quality (0-100)
  • Output image format (JPEG, PNG, WebP)
  • Video codec and bitrate
  • Batch processing size

📊 Performance

  • Image Compression: Typically achieves 40-70% size reduction
  • Video Compression: Can reduce size by 50-80% depending on codec
  • Processing Speed: Varies based on file size and compression settings

🤝 Contributing

See CONTRIBUTING.md for guidelines on how to contribute to this project.

⚠️ Important Notes

  • Backup First: Always keep backups of original files before processing
  • Quality Loss: Compression may reduce image/video quality; test settings first
  • Output Directory: Ensure Output/ directory has sufficient free disk space
  • Format Support: Check notebook documentation for supported file formats

📄 License

This project is provided as-is for personal use.

🐛 Troubleshooting

Common Issues

Issue: Notebook not found

  • Solution: Ensure all notebook files (.ipynb) are in the root directory

Issue: Output directory is empty

  • Solution: Verify that the Output/ directory has write permissions

Issue: Compression fails

  • Solution: Check file format compatibility and available disk space

📞 Support

For issues or questions:

  1. Check the notebook comments and documentation
  2. Review the Others/ directory for previous implementations
  3. Ensure all dependencies are correctly installed

🆘 Getting Help

Missing Images folder error?

  • Create a folder named Images in the project root
  • Place your files inside this folder
  • Re-run the notebook

Cannot find Output folder?

  • The notebook automatically creates the Output/ folder
  • Ensure you have write permissions in the project directory

Last Updated: 2025-06-26 Version: 2.0 (Professional Release)

About

A highly optimized Python/Jupyter tool for batch reducing image & video sizes with binary search compression, EXIF metadata retention, duplicate detection, and Live Photo frame extraction.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages