



// This script uses filename (sans extension), the photo's timestamp*, and // configurable fields in `criteria` (found in the `CUSTOMIZE` section) to find // likely. heic - which nullifies the space savings. Unfortunately, many users like myself // end up with numerous duplicate photos as a result - half. `findJpgHeicDuplicates.js` // - Alternatively, check the post above for a download link // - Make executable: `chmod +x findJpgHeicDuplicates.js` // - Modify the configuration in the `CUSTOMIZE` section if desired // - This is where you can configure getting rid of `.jpg` vs `.heic` // - Select a set of photos in Photos.app // - Run `./findJpgHeicDuplicates.js` // - Process the suspected duplicates in `Duplicates/timestamp` // // Alternatively, users not comfortable with the command line can: // - open `Script Editor.app` on their Mac // - `/System/Applications/Utilities/Script Editor.app` on Big Sur // - create a new script // - Change the language to JavaScript (if `AppleScript` is displayed near // the top left) // - Copy and paste the contents of this script // - You will need to compile with `command` + `k` (or the hammer button) in // between each run or else you will get `Error: Synta圎rror: Can't create // duplicate variable:` // // Apple's newish `.heic` image format compresses photos somewhat smaller than // jpg with some loss of minor details. findJpgHeicDuplicates.js // // // Quickstart: // - Copy this into a file, e.g. Once I changed the setting to View -> Your Photos Only, the script Photos are actually not downloaded locally (if you can identify one thatĬauses an error, right click on the photo and you’ll see an option to save it View that seems to default to Yours & Shared it looks like the Shared With this script on Monterey it ends up that Photos has a new option under UPDATE 20211203: I started getting Error: Error: Can't get object. Script to find them you can remove them all at one fell swoop by selecting all I’ve tried to include aįair amount of instructions for use in the script itself. This script processes selected photos in Photos.app and makes an albumĬontaining probably duplicates for easy bulk deletion.

Of defeats the purpose of using the slightly smaller. Thanks to Apple’s Photo Stream (I think that’s the culprit), I end up with a Bottom Line: Script to remove either JPG or HEIC duplicates from Photos.app
