[Bash]: Resize multiple images on terminal
I ran into situation where I've had multiple screenshot images that were larger than necessary. Here is how you can conveniently resize multiple images that may take up less space on your PC storage with bash command.
It may be a good practice to leave the original files in case they're needed in the future.
sips -Z 600 *.png
- sips: image processing system
- -Z: maintains the images' ratio
- 600: maximum width of the image that you'd like to convert to
- *.png: selects all the files in the directory that has an extension of png
sips -z [height] [width] *.png
- It resizes the images to specified dimensions that can alter the aspect ratio of the image
46 images (6.6MB) were converted to 4MB