Skip to content

Instantly share code, notes, and snippets.

@ngearing
Last active December 14, 2020 00:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngearing/9e54ee85d3941d2b24e0780fe2fc13a6 to your computer and use it in GitHub Desktop.
Save ngearing/9e54ee85d3941d2b24e0780fe2fc13a6 to your computer and use it in GitHub Desktop.
sips resize and compress images quickly
#!/bin/bash
# cd into the directory with the images you want to resize then run this.
# install slugify with brew install slugify
mkdir resized
sips -Z 1920 -s formatOptions 65 -s format jpeg * --out resized/
slugify -acdtu resized/*
@inspiredearth
Copy link

Thanks for sharing this.
And for those reading this who have no idea what slugify is, you can install it with Homebrew.
If you don't have Homebrew, see instructions here.
Or if you're already using Homebrew, install Slugify with, you guessed it, brew install slugify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment