Mac Automator | Convert Any Image Type to JPG and Compress in Normal Quality

01kg - Nov 22 '24 - - Dev Community

TL;DR

I could not find an existing action to do this, so choose to use script.

*Download it if you are too busy. *

Create an Automator Application like this:

screenshot of Automator app GUI

The script is:

fileList=""
for file in "$@"
do

filename="$file"
sips -s format jpeg -s formatOptions normal "$file" --out "${filename%.*}.jpg"

rm $file

done
Enter fullscreen mode Exit fullscreen mode

Save the Application anywhere. Drag images on it, it will start to process.

*Note: This script will convert and compress image in place. *

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .