DEV Community

01kg
01kg

Posted on

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

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. *

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay