https://github.com/jiftoo/imgopt
A simple cli script for optimizing images in bulk.
https://github.com/jiftoo/imgopt
image-optimization image-processing
Last synced: 5 months ago
JSON representation
A simple cli script for optimizing images in bulk.
- Host: GitHub
- URL: https://github.com/jiftoo/imgopt
- Owner: jiftoo
- Created: 2022-05-22T00:16:58.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-05T17:39:44.000Z (almost 4 years ago)
- Last Synced: 2025-08-24T14:41:18.127Z (10 months ago)
- Topics: image-optimization, image-processing
- Language: JavaScript
- Homepage:
- Size: 30.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/jiftoo/imgopt)
# Welcome to `imgopt`!
This cli tool is inspired by the awesome [expo-optimize](https://www.npmjs.com/package/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 :rocket:
```
# Simply run this
npx imgopt [options]
```
See `npx imgopt --help` for more.
# Examples :pencil:
```
# 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
```