I often need to take photos using my iPhone and then get them to my Mac for uploading to a web service or putting into an app. So I created a service using Automator that will convert the .HEIC images to .JPG. This works well, but I was thinking it would be nice to just automatically do this.
When I airdrop an image from my phone, it shows up in the Downloads folder. So I thought about creating a folder action for that folder, but I worry that could raise some issues since so many things get sent here.
And I can’t see a way in Automator to only do an action IF the file type is HEIC.
I suppose I could use Hazel, but I don’t currently run it after not using it much.
I just discovered this, and despite it being a year old, I realized that I’ve basically solved the same issue, except that I didn’t use Automator and Folder Actions, I used Hazel and ImageMagick in a shell script.
#!/usr/bin/env zsh -f
if ((! $+commands[magick] ))
# note: if magick is a function or alias, it will come back not found
echo "$NAME: 'magick' is required but not found in $PATH" >>/dev/stderr
if ((! $+commands[tag] ))
# note: if tag is a function or alias, it will come back not found
echo "$NAME: 'tag' is required but not found in $PATH" >>/dev/stderr
for i in "$@"
if [[ "$EXT" == "heic" ]]
if [[ -e "$JPG" ]]
echo "$NAME: '$JPG' already exists. Skipping." >>/dev/stderr
magick convert "$i" "$JPG”
tag --add "Converted" "$i" "$JPG"
I call that script from within Hazel whenever it finds an HEIC file that does NOT have the ‘Converted’ tag.
99.999% of the time the HEIC was AirDropped, and if it wasn’t, there’s still no harm in making a JPG version of it.
Anyway, I thought I’d mention it in case anyone else was looking to do the same thing.