Juri Strumpflohner

RSS
all notes 🪴 evergreen · Updated

Compress images via the terminal on MacOS

Author profile pic
Juri Strumpflohner

A quick and easy way is to use sips:

sips -Z 640 example.png 

This resizes the image and is therefore less useful.

Do do proper compression in various formats, e.g. avif, ImageMagick is nice.

Install the required tools

brew install libheif
brew install imagemagick

Run the conversion

magick input.jpg -quality 50 output.avif