Skip to content

AlexanderWillner/imageoptim-alfred-workflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alfred ImageOptim Workflow

download

ImageOptim removes bloated metadata. Saves disk space & bandwidth by compressing images without losing quality.

Usage

To activate this workflow on one or multiple folders or files (JPG, PNG, GIF, or SVG) you've a number of possibilities. After a few seconds the image(s) should be compressed.

  1. In Finder select your files/folders, invoke your hotkey for Universal Actions, then select Optimize Images. Invoke
  2. Or use a File Buffer by invoking your Alfred Hotkey, typing the keyword imageoptim, typing the name of a file/folder, select multiple files using ⌥ + Arrow up, and finally pressing enter. File Buffer

Caveats

Please note that ImageOptim or related tools should be installed (e.g. via brew). Binaries that will be used (if installed):

  • JPEG: jpegtran, jpegoptim
  • GIF: gifsicle
  • SVG: svgcleaner
  • PNG: pngcrush, advpng, oxipng, pngquant, zopflipng, pngout

Installing the Workflow

  1. Simply download the last release
  2. Unzip the file on your computer
  3. Install imageoptim.alfredworkflow by double-clicking the workflow file and clicking on "Import".

You'll now see the workflow listed in the left sidebar of your Workflows preferences pane.

Command Line

$ ./bin/imageoptim workflow/icon.png
Starting...
Optimizing workflow/icon.png with pngcrush...
Optimizing workflow/icon.png with advpng...
Optimizing workflow/icon.png with oxipng...
File already optimized
Optimizing workflow/icon.png with pngquant...
Optimizing workflow/icon.png with zopflipng...
Optimizing workflow/icon.png
Input size: 20875 (20K)
Result size: 20266 (19K). Percentage of original: 97.083%
Result is smaller

Optimizing workflow/icon.png with pngout...
Done.

Details

To create a modified version of the workflow, edit the files and run make workflow to create an updated workflow.

Disclaimer

This package has been inspired by ramiroaraujo's Image Optim Alfred Workflow.