Certainly! Here's the contents of the README file in a bash code block that you can copy:
This Node.js script is designed to compress JPEG images within a specified folder for optimal web browser usage.
- Node.js: Ensure that Node.js is installed on your machine. You can download it from nodejs.org.
-
Clone the repository:
git clone <repository-url>
-
Navigate to the project folder:
cd image-compression-script
-
Install dependencies:
npm install
-
Run the script:
node compress-images.js /path/to/your/images
Replace
/path/to/your/images
with the path to the folder containing JPEG images you want to compress.
- JPEG Compression: Reduces file sizes for efficient web usage.
- Image Resizing: Resizes images to a maximum size of 15 MB.
- Output Folder: Saves compressed images in respective folders under the name "compressed."
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to use and modify it as needed!