vgnz93hs
vgnz93hs

I created a photo backup function using Shortcuts

I used Shortcuts to create a function that compresses images saved in Photos and saves them to iCloud.
I’m currently studying abroad, and I store my photos on my Mac.
Since my iPhone only has 128 GB of storage, I regularly transfer photos to my Mac after taking them. However, because I’m abroad, there’s always a possibility that my Mac could be stolen, damaged, or lost.
I’ve also lost photos in the past due to HDD failures and mistakes while transferring files. That’s why I created this Shortcut.

How It Works

First, the Shortcut searches my Photos library and finds photos that haven’t been added to an album called Archived.
It then reduces their resolution to a fixed size and uses Pixelmator Pro’s compression feature to compress them as HEIC files.
Finally, it saves the compressed photos to a designated folder in iCloud Drive and adds the original photos to the Archived album.
I’ve set this Shortcut to run automatically once a day at 12:00 AM.
This way, even if something happens to my Mac, I’ll still have lower-quality copies of my photos stored safely in iCloud.

Image Quality / Storage

This is roughly what the image quality looks like after compression. Some of the finer details are lost, but since these copies are only intended as backups, I don’t think those details are particularly important. That’s why I chose this resolution and compression level.
The file size after compression varies depending on the amount of detail in each image, but for the photos I usually take, the average is around 52 KB per photo.
Assuming I take an average of 32 photos per day, an entire year of photos would take up only about 607 MB.
That’s small enough to fit comfortably within the 5 GB of iCloud storage included with the free plan, so I back up every photo I take to iCloud Drive this way.