Skip to content

msantic/image-web-optimize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image web optimize

Usage

node index.js <INPUT-FOLDER> [<MAX-WIDTH>]
  • <INPUT-FOLDER>: Path to your folder with images (jpg/jpeg/png, any case).
  • <MAX-WIDTH>: (Optional) Maximum width in pixels for resizing. Default is 1600.

Example:

node index.js ~/input-folder/ 1200

Output

  • All converted .webp images will be saved in the output/ folder.
  • Existing .webp files in output/ will be skipped.

Requirements

  • Node.js 18+
  • Install dependencies with:
    npm install

Features

  • Recursively finds all jpg/jpeg/png images (case-insensitive).
  • Resizes images to the specified max width (no enlargement).
  • Auto-orients images based on EXIF data.
  • Converts all images to WebP format.
  • Skips images that are already converted.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published