https://github.com/jmcollin/optimizeimage
Shell - Allow you to optimize and compress your images
https://github.com/jmcollin/optimizeimage
cli gifsicle imagemagick mozjpeg optimize-images pngcrush pngquant shell
Last synced: 4 months ago
JSON representation
Shell - Allow you to optimize and compress your images
- Host: GitHub
- URL: https://github.com/jmcollin/optimizeimage
- Owner: jmcollin
- Created: 2015-07-24T15:04:18.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-07T08:50:56.000Z (almost 10 years ago)
- Last Synced: 2025-04-05T04:16:43.246Z (6 months ago)
- Topics: cli, gifsicle, imagemagick, mozjpeg, optimize-images, pngcrush, pngquant, shell
- Language: Shell
- Homepage:
- Size: 145 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Optimize Images
=========Allow you to optimize and compress your images in batches
## Dependencies
* [**mozjpeg >= 3.1**](https://github.com/mozilla/mozjpeg) [:link: Help](https://goo.gl/yvHJBx)
* [**gifsicle**](https://github.com/kohler/gifsicle) [:link: Help](https://goo.gl/if9HMH)
* [**pngcrush >= 1.7.85**](http://pmt.sourceforge.net/pngcrush/) [:link: Help](https://goo.gl/8HzFZu)
* [**pngquant >= 2.3.1**](https://github.com/pornel/pngquant) [:link: Help](https://goo.gl/fxnFOl)
* [**ImageMagick >= 6.7.7-10**](https://github.com/ImageMagick/ImageMagick)
* **libpng >= 1.6.17**## Getting Started
To use this script, choose one of the following options to get started:
* Download the latest release of Optimize Images
* Fork this repository on GitHub## Installation
**Locally**
Installing Optimize Images locally is a matter of just running the script in your project directory:
```
Natsuflame@debian:home # git clone https://github.com/jmcollin/optimizeImage.git
```**Globally**
```
Natsuflame@debian:home # cd optimizeImage/
Natsuflame@debian:optimizeImage # cp optimizeImage.sh /usr/bin/optimizeImage
```Instruction for **mozjpeg**
```
Natsuflame@debian:home # cd mozjpeg/build/
Natsuflame@debian:build # cp cjpeg /usr/bin/mozcjpeg
Natsuflame@debian:build # cp djpeg /usr/bin/mozdjpeg
Natsuflame@debian:build # cp jpegtran /usr/bin/mozjpegtran
```## Usage
```
Usage: optimizeImage [OPTION]... SRC... DEST
or optimizeImage [OPTION]... SRC... [DEST]Options
-q 90, --quality 90 set quality (default ~ 90)
-t jpg, png, gif set image type (default ~ jpg)-d print dependencies
--version print version number
(-h|-?) --help show this help (-h is --help only if used alone)
```## Example Usage
```
Natsuflame@debian:optimizeImage # optimizeImage -t png src/ /home/optimizeImage/test/
Clean directory
Optipmize image(s)
[✔] ./PrestaShopAddons.png[✘] Original Size: 72.78 KB
[✔] Savings Size: 58.99 KB
[✔] % Savings: 19.44%```
Original image (72.8 KB):

Optimize image (59 KB):

## Version
1.0.0## Copyright and License
Copyright 2014 Jean-Marie Collin. Code released under the [MIT License](https://github.com/jmcollin/autoindex/blob/master/LICENSE) license.
Theme used Copyright 2014 Iron Summit Media Strategies, LLC. Code released under the [Apache 2.0](https://github.com/IronSummitMedia/startbootstrap-freelancer/blob/gh-pages/LICENSE) license.