Apple Photos Toggle for Unhiding Hidden Photos?

Hoping someone has a solution to this but I’d like an easy way to hide/unhide hidden photos when I am in one of my Apple Photos albums (Mac or iPhone). Currently the only way seems to be going to to the ‘hidden’ photos album and manually unhiding photos. Pretty cumbersome I’d say.

I think you’re right that Photos does not provide a way to do this other than unhiding the images. This sounded like an interesting problem so out of curiosity, I tried a couple approaches to automate this but they were unsuccessful. My first attempt was to use AppleScript to automate the following workflow:

  • Find all photos in Hidden album
  • Add the “hidden” keyword if not already present
  • Unhide the photos
  • When requested, find all photos with “hidden” keyword and re-hide these

I didn’t get far as Photo’s AppleScript interface does not provide a way to access hidden photos or to change the hidden status.

Attempt #2 was to do this using the native PhotoKit API that Apple provides for programmatic access to your Photos library. I was able to get Objective C code working (well, actually Python code that calls Objective C code) that could get all the currently hidden photos, add them to a regular album (“HiddenPhotos”) then unhide them. That works and can be executed with something like FastScripts to run with a hot key. The reverse of this is to find all photos in the “HiddenPhotos” album and re-hide these. I also got this working but unfortunately Photos prompts the user for every single photo asking for permission to hide it and there’s no way around this. Thus for a large number of photos this is untenable. An alternative would be to go into the HiddenPhotos album, select all, then hide all. I can’t figure out a way to automate this with no user interaction – I don’t think it’s possible given Apple’s design of Photos.

Screenshot 2023-08-20 at 11.52.32 AM

One note: for this to work at all, you need to uncheck the privacy settings in Photos | Settings to disable the “Use Touch ID or Password” which means your deleted and hidden items are not password protected. There’s also no way around this as any attempt to fetch the hidden photos fails if this privacy setting is enabled.

So…if you can’t automate the whole thing then this alternative workflow may work for you depending on how often you need to do this:

Create a Smart Album for all photos with keyword of “hidden”
Open the Hidden album, select all (Cmd+A), open the inspector (Cmd+I) and add the keyword “hidden” to all photos.
Switch back to the album you were working in and all your newly unhidden photos will be visible.
When ready to hide them again, switch to the Hidden smart album you created in step 1, select all, then right click and select “Hide”.

This is cumbersome unfortunately but it does work and allows you preserve the state of your hidden photos (e.g. which were previously hidden) by using a keyword.

1 Like

First off, let me say thank you for tackling this issue so thoughtfully and confirming that Apple can make some things unnecessarily difficult. I guess with hidden photos they’re trying to make doubly sure people don’t inadvertently ‘hurt’ themselves :smiley:

This was a great hack that I’d not considered and something I may actually since it seems to achieve what I’m looking for. Having a somewhat redundant ‘smart folder’ is not that big of a deal if it achieves what I’m looking for.

The only other downside I can think of right now is if Apple changes the behavior of smart albums in future updates that somehow breaks this but worst case we go back to the old cumbersome methods. Also they could change the keywords design/architecture. That reminds me of how sometimes I find the Finder ‘comments’ field unreliable for Spotlight searches. I used to put file keywords in there before as a rudimentary tagging system but gave up on it.

Update: I just tested it and it works with your suggested hack. It’s not the most elegant solution but it does the job without too much hassle. For now I’ve just created a specific keyword tag for hidden photos and a smart album to show those. Brilliant! Thanks again @Rhet_Turnbull

1 Like

Great! Glad it worked. Just don’t forget to periodically add the hidden keyword in case you’ve added more photos to the Hidden album.

Yep good point I’ll have to remember that indeed. Thanks again!

Also to add there’s a nice feature when photos are tagged in Apple Photos where it shows a little tag outline icon on the top right of the photo in your library indicating it is actually tagged. Since I was not using tags in Photos before I never noticed this. Useful.