Convert HEIC Images to JPG Part 2: Mac Automator

Published: Sep 1, 2019
Updated: Feb 21, 2024

This post builds on part 1. In that post, I described the command-line steps necessary to convert hundreds of my wife’s pictures from .heic to .jpg. Well, turns out this isn’t a one-time-thing. She works in real estate, and lately has been needing to do the task more often. So I added a simple GUI using Mac Automator. A rough version of the steps follow:

  1. Open Mac Automator and choose Application

  2. Drag over action Ask for Finder Items

    1. Choose a folder to start at
    2. Change Type to Folders
  3. Drag over action Run Shell Script

    1. Choose shell /bin/bash

    2. Change Pass input to as arguments

    3. Paste in this script:

       dir="$@"
       cd "$dir"
       shopt -s nocaseglob
       for f in *.heic; do
         echo "Converting $f"
         /usr/local/bin/mogrify -format jpg $f
       done
      
  4. Drag over action Display Notification

    1. Enter the Title and Message you want to display

How it works: The user runs the application and is prompted with a Finder window to choose a folder. Once a folder is chosen, the script changes to it, then does a case-insensitive search for all .heic images and converts them. When done, it displays a notification to the user.

Screenshot of Mac Automator application
Screenshot of Mac Automator application