Last active
January 15, 2026 09:18
-
-
Save skounis/d5c2c707ee2b61bb6548 to your computer and use it in GitHub Desktop.
Batch Resize Images Quickly in the OS X Terminal 0 sips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # So what's happening? Well, "sips" is the command being used | |
| # and -Z tells it to maintain the image's aspect ratio. | |
| # "640" is the maximum height and width to be used and "*.jpg" | |
| # instructs your computer to downsize every image ending in .jpg. | |
| # It's really simple and shrinks your images very quickly. | |
| # Just be sure to make a copy first if you want to preserve their | |
| # larger size as well. | |
| # | |
| # http://lifehacker.com/5962420/batch-resize-images-quickly-in-the-os-x-terminal | |
| # | |
| # sips 10.4.4 - scriptable image processing system. | |
| # This tool is used to query or modify raster image files and ColorSync ICC profiles. | |
| # Its functionality can also be used through the "Image Events" AppleScript suite. | |
| # | |
| # Usages: | |
| # sips [-h, --help] | |
| # sips [-H, --helpProperties] | |
| # | |
| # sips [image-query-functions] imagefile ... | |
| # | |
| # sips [profile-query-functions] profile ... | |
| # | |
| # sips [image modification functions] imagefile ... | |
| # [--out result-file-or-dir] | |
| # | |
| # sips [profile modification functions] profile ... | |
| # [--out result-file-or-dir] | |
| # | |
| # | |
| # Profile query functions: | |
| # -g, --getProperty key | |
| # -X, --extractTag tag tagFile | |
| # -v, --verify | |
| # | |
| # Image query functions: | |
| # -g, --getProperty key | |
| # -x, --extractProfile profile | |
| # | |
| # Profile modification functions: | |
| # -s, --setProperty key value | |
| # -d, --deleteProperty key | |
| # --deleteTag tag | |
| # --copyTag srcTag dstTag | |
| # --loadTag tag tagFile | |
| # --repair | |
| # | |
| # Image modification functions: | |
| # -s, --setProperty key value | |
| # -d, --deleteProperty key | |
| # -e, --embedProfile profile | |
| # -E, --embedProfileIfNone profile | |
| # -m, --matchTo profile | |
| # -M, --matchToWithIntent profile intent | |
| # --deleteColorManagementProperties | |
| # -r, --rotate degreesCW | |
| # -f, --flip horizontal|vertical | |
| # -c, --cropToHeightWidth pixelsH pixelsW | |
| # -p, --padToHeightWidth pixelsH pixelsW | |
| # --padColor hexcolor | |
| # -z, --resampleHeightWidth pixelsH pixelsW | |
| # --resampleWidth pixelsW | |
| # --resampleHeight pixelsH | |
| # -Z, --resampleHeightWidthMax pixelsWH | |
| # -i, --addIcon | |
| # | |
| # | |
| # eg | |
| # sips -c 500 500 ./* | |
| sips -Z 640 *.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment