Skip to content

Instantly share code, notes, and snippets.

@javan
Created July 8, 2019 18:51
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javan/c07960246cac037be64acf3a79d16f0c to your computer and use it in GitHub Desktop.
Save javan/c07960246cac037be64acf3a79d16f0c to your computer and use it in GitHub Desktop.
macOS: Optimized Screenshots
😱 Before: ~/Desktop/Screen Shot….png 4.1 MB
🏆 After: ~/Screenshots/Screen Shot….png 937 KB

  ⤵

  1. Install https://pngquant.org/
    $ brew install pngquant
  2. Press Shift5 to launch Screenshot.app
    1. Go to OptionsOther Location… and change the folder to ~/Screenshots
      👀
  3. Launch Automator.app and FileNewFolder Action
    1. Choose your ~/Screenshots folder
    2. Drag the Run Shell Script action in
    3. Change Pass input: to as arguments
    4. Paste:
      for filename in "$@"; do
        /usr/local/bin/pngquant "$filename" --output "$filename" --quality=65-80 --force --strip 
      done
      👀
    5. Save and Quit
  4. Screenshot away and enjoy!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment