Skip to content

About

mage Optimizer is a Node.js tool that resizes and optimizes images across nested directories, preserving their original structure in a separate folder. It supports JPEG, PNG, WebP, and TIFF formats, making it ideal for developers needing efficient image processing for web and mobile projects.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Image Optimizer

Image Optimizer is a Node.js application for resizing and optimizing images while maintaining directory structure integrity.

Project Structure

/image-optimizer
    ├── index.js                # Main script for image processing
    ├── package.json            # Project configuration and dependencies
    └── README.md               # Project documentation

Installation

  1. Clone the repository:

    git clone https://github.com/thakurcoderz/image-optimizer.git
    cd image-optimizer
  2. Install dependencies:

    npm install

Usage

  1. Configure index.js:

    • Update inputDir and outputDir variables with your source and destination folder paths.
    • Adjust maxWidth and maxHeight for image resizing as needed.
    • Modify allowedFormats to include or exclude image formats according to your requirements.
  2. Run the script:

    npm start

Variables to Customize in index.js

  • inputDir: Path to the directory containing original images.
  • outputDir: Path to the directory where optimized images will be saved.
  • maxWidth: Maximum width for resized images.
  • maxHeight: Maximum height for resized images.
  • allowedFormats: Array of allowed image formats to process (e.g., ['jpg', 'jpeg', 'png', 'webp', 'tiff']).

Acknowledgments

About

mage Optimizer is a Node.js tool that resizes and optimizes images across nested directories, preserving their original structure in a separate folder. It supports JPEG, PNG, WebP, and TIFF formats, making it ideal for developers needing efficient image processing for web and mobile projects.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages