Search the Community
Showing results for tags 'optimization image jpg png'.
ImageOptim Workflow for Alfred app This is a wrapper Alfred workflow around the great ImageOptim-CLI library from Jamie Mason. Mason's library uses three image optimization applications to automate optimization of JPEGs and PNGs. It uses the open source ImageAlpha and ImageOptim apps, and the JPEGmini app, which is not free, but highly recommended. Together they shrink images like a beast. My own addition to this image processing is that if JPEGmini is unavailable, it uses ImageMagik's mogrify to compress JPEGs to quality 75, if they're actually higher than 75. To do this, I'm also bundling ImageMagik'smogrify and identify. A quality of 75 is usually pretty safe and it still has a way smaller size and usual JPEGs saved from Photoshop without optimization. That being said, JPEGmini does way better job and it's recommended. Requirements ImageOptim, installed in /Applications folder. ImageAlpha, installed in /Applications folder. JPEGmini, optional but recommended, installed in /Applications folder. If using JPEGmini, you need to add Alfred 2 to the allowed apps in the accesibility list. Go to Preferences, Security and Privacy, Privacy tab, click the lock to allow changes, and drag the Alfred 2 app into the list. Usage 1. find or select one or more images or folders, show the file actions in Alfred, and select "Optimize Images". Note that any Alfred's way of selecting files work, such us: select one or multiple files/folder in finder and press ⌘ alt \ browsing or finding files in Alfred, and triggering actions for the file saving files in Alfred's file buffer, and then ⌘ → to action buffered files. 2. You'll see a notification indicating the number of files to process. The work is done partially with AppleScript, so even if it's happening in the background, the apps are actually laoded and you can focus on them to check the status. Depending on the number and size of images, it could take a while. 3. When the optimization is completed, you'll see another notification, indicating the original Kilobytes, the current Kilobytes, total savings and savings percent. Caveats You shouldn't run optimizations in parallel. Tecnically you could if the batch already jumped to the next app (from JPEGmini to ImageOptim for example), but it's looking for trouble. I'll consider adding a check in the future to prevent parallel process from happening, but I'm affraid this could add other complications, as in how to clear the processing flag if optimization process is interrumpted earlier. Installation For OS X 10.9 Mavericks, Download the alfred-image-optim-workflow.alfredworkflow and import to Alfred 2. For Previous OS X Versions, Download the alfred-image-optim-workflow.alfredworkflow and import to Alfred 2. Source Code Clone or Fork the Workflow: https://github.com/ramiroaraujo/alfred-image-optim-workflow Changelog 2014-01-06 - Released 2014-01-23 - Added folder support, and correctly counting number of files inside folders