Skip to content
/ imgopt Public

A simple cli script for optimizing images in bulk.

Notifications You must be signed in to change notification settings

jiftoo/imgopt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Repo stars

Welcome to imgopt!

This cli tool is inspired by the awesome expo-optimize tool. Unlike the former, imgopt allows the user to convert images to other formats, or limit their width outside of an npm project and without the need to install the sharp-cli package.

Usage 🚀

# Simply run this
npx imgopt <input-directory> [options]

See npx imgopt --help for more.

Examples 📝

# Convert all files in the current directory to JPEG with quality=80, save to ./optimized
npx imgopt . --format jpg --quality 80 -o optimized

#Convert all files to PNG, limit width to 1000px, also copy non-image files, save to ./output (default)
npx imgopt . --format png --max-width 1000 --copy-all

# Keep format, quality=90, clear the output folder before optimizing
npx imgopt . --quality 90 --clear

About

A simple cli script for optimizing images in bulk.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published