Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

Kraken CLI

Optimize images with the Kraken.io API.

Dependencies

  • jq - Used to parse JSON responses.

Install

$ curl https://raw.githubusercontent.com/kjbrum/kraken-cli/master/kraken > ~/bin/kraken
$ chmod +x ~/bin/kraken

Usage

Kraken CLI

Optimize images with the Kraken.io API.

Usage:
    $ kraken <options>

Options:
    --callback=<url>             Callback URL for posting the response to
    --convert=<json>             Convert your image to a different format
                                     - https://kraken.io/docs/image-type-conversion
    --dev                        Enable developer mode (false)
    --file=<path/to/file>        Path to the file to upload and optimize
    --folder=<path/to/folder>    Path to the folder of images to upload and optimize
    --help                       Display the help text
    --lossy                      Enable lossy optimization (false)
    --meta=<array>               Preserve metadata of the image (profile|date|copyright|geotag|orientation)
    --orient                     Enable lossless rotation of the image (false)
    --quality=<integer>          Quality of the optimized image (1-100)
    --resize=<json|array>        Resize or generate multiple sizes of the given image
                                     - https://kraken.io/docs/image-resizing
                                     - https://kraken.io/docs/generating-image-sets
    --sampling=<subsampling>     Set a custom chroma subsampling for the optimization (4:2:0|4:2:2|4:4:4)
    --status                     Query your account status
    --url=<url>                  URL of the image you want to optimize
    --webp                       Enable returning WebP format (false)

Example:
    $ kraken --url=http://example.com/image.jpg --lossy --convert='{"format": "jpg", "background": "#ff0000"}'
    $ kraken --url=http://example.com/image.jpg --meta='["profile", "date"]'
    $ kraken --file=path/to/image.jpg --resize='{"size": 150, "strategy": "square"}'
    $ kraken --folder=path/to/folder --lossy --quality=50 --webp

Config

Find/create your API credentials here.

KRAKEN_KEY

Your Kraken.io API key.

KRAKEN_SECRET

Your Kraken.io API secret.

License

Copyright © Kyle Brumm. Free to use on whatever and may be redistributed under the terms specified in the license.

About

Optimize images with the Kraken.io API.

Resources

License

Releases

No releases published

Languages

You can’t perform that action at this time.