Six Colors
Six Colors

Apple, technology, and other stuff

Support this Site

Become a Six Colors member to read exclusive posts, get our weekly podcast, join our community, and more!

Reducing suboptimal iCloud Photos storage sizes

Glenn Fleishman, art by Shafer Brown

iCloud Photos requires mysterious files and processes and often consumes huge amounts of storage space. Six Colors subscriber John writes in with a question about one aspect of this:

I have photos set to optimize storage, and it’s currently (according to DaisyDisk) using 60GB of my 500GB MacBook Air.…But mediaanalysisd is also using 60GB – I understand that’s one of the processes that run when idle, but should it be using that much space, and can I restrict it?

The tl;dr answer is: make sure you’re running macOS Sequoia 15.3 or later. A bug in 15.2 apparently caused this problem for many people. If you’re already on 15.3 or later, I provide more instructions at the end of the article for deleting the cache and the consequences.

Let’s break down how iCloud Photos manages your storage, particularly when you don’t want to store full-resolution images and videos on your Mac.

All those moments will be lost in time, like tears in rain

Photos stores nearly all its data inside a macOS package named Photos Library by default, with a .photoslibrary extension. This package contains a number of folders that allow Photos to perform tasks like retaining your original image and recording modifications that can be reverted later. This structure isn’t designed for humans, but as an efficient way for the app to manage, display, search, and organize media.

If you enable iCloud Photos in Photos > Settings > iCloud, you have two choices presented:

  • Download Originals to this Mac
  • Optimize Mac storage
Screenshot of Photos iCloud preferences in macOS
You can choose whether to store full-resolution or optimized media on your Mac with Photos iCloud settings.

(Please ignore Apple’s capitalization. It drives me bonkers.)

I have advocated for a long time for people to devote enough storage on their Mac—or one of their Macs if they have multiple—to store the entire downloaded Photos library. Because iCloud storage of Photos is a black box, there’s no good way to interact with your files backed up there. Without owning a full-resolution local copy that you can archive and update via Time Machine, another local backup option, or cloud backup (and preferably a combination of those), you could find yourself reliant on the iCloud copy.

While Apple has been rock solid with iCloud storage for years, you can have other problems with relying on it: you could be locked out of your account, because of a reason Apple won’t inform you of. Or, you could have a catastrophic set of system failures or equipment loss—such as in a fire or natural disaster—or even an issue with password and security code record keeping that leaves you unable to prove ownership. If someone hijacked your account, they can also delete your media using iCloud.com or through a locally synced copy, although that’s less likely.

With my warnings noted, optimizing iCloud Photos storage can be quite effective when you have an enormous library relative to your local storage. I have a 2 TB SSD attached to a Mac Studio to keep my 800 GB Photos Library from filling the internal 1 TB drive. However, I have optimization enabled on my MacBook Pro, because that laptop’s 1 TB internal drive means I lack the storage to keep the whole thing. Question-asker John’s library occupies about 1 TB on iCloud.

Let’s dig into optimization.

Uncontrollable purging

Photos optimizes storage by retaining a thumbnail and other metadata about an image or video but dumping the full-resolution media file, which is retained in iCloud. If you double-click, edit, export, or otherwise preview an image or video, the file is downloaded, offering a circular progress completion graphic in the lower-right corner to let you know something is happening. On sufficiently fast networks, you rarely have to wait except for large videos.

Apple uses optimization in a few places, including iCloud Drive (System Settings > iCloud > iCloud Drive), and uses the same philosophy in each case. macOS has some background monitoring to avoid your drive filling up to 100% and rendering it unusable. (This doesn’t always work.)

When some unspecified threshold is reached, various background daemons that are set to optimize can kick in. With iCloud Drive, the least-used files are dumped from local storage first.

With iCloud Photos, however, Apple appears to be extremely aggressive. I can’t think of a single case in which I’ve had optimization enabled in which the optimized Photos Library is more than a range of 10% to 20% of the full library size. On the above-mentioned MacBook Pro, my Photos Library is under 40 GB of local storage.

Screenshot of Manage Storage from macOS System Settings showing a bar representing in green storage in use and individual apps listed below, including Photos.
You can see the storage that iCloud says your synced Photos Library takes up as part of your iCloud or iCloud+ storage.

(Photos and iCloud are often very erratic about reporting storage and quantities of media. For instance, while the Photos Library is about 800 GB with full-resolution downloads configured on my Mac Studio, iCloud reports it takes up 670 GB online. I’m unclear what extra material makes up a 130 GB difference.)

Having that data in mind, we can circle back to John’s primary question—I am a master of expositional sidetracking—about why the daemon mediaanalysisd and its associated storage are sucking up so much data.

The mediaanalysisd agent’s job is to process images in the background during low-activity periods to perform facial (person and pet) and object recognition. (Apple notes, “Face recognition and scene and object detection are done completely on your device rather than in the cloud.”)

You can see where this daemon stores its thinking by going to the Finder, choose Go > Go To Folder, and enter:
~/Library/Containers/com.apple.mediaanalysisd/
Data/Library/Caches/com.apple.mediaanalysisd

On my full-resolution-storing Mac Studio, the folder there takes up 205 MB; on the MacBook Air with optimization on, a bit more at 386 MB. As I mentioned at the outset, people have reported for a few releases that this file will grow uncontrollably, but Sequoia 15.3 and later appear to have stanched that.

You cannot turn this agent off without going through some command-line hoops, many of which are reversed when you install the next macOS update. However, because this is a cache, you can opt to delete it if the storage is causing problems.

Causing amnesia through file deletion

If your com.apple.mediaanalysisd folder is bulging like a failed lithium-ion battery, here’s what you can do:

  1. Quit Photos.
  2. Drag com.apple.mediaanalysisd to the Trash.
  3. Empty the Trash.
  4. Restart your Mac.

Deletion may cause Photos to start over with analyzing people, pets, and things. It might result in the folder swelling back to its original size! But given the reports online from people starting in Ventura, and particularly with people after upgrading to macOS 15.3, this is the best path forward.

For further reading

Our very own chief, Jason Snell, has the definitive book on the topic, Take Control of Photos, where you can find oodles of information and step-by-step instructions on working with the enormous beast that is Photos.

[Got a question for the column? You can email glenn@sixcolors.com or use /glenn in our subscriber-only Discord community.]

[Glenn Fleishman is a printing and comics historian, Jeopardy champion, and serial Kickstarterer. His latest books are Six Centuries of Type & Printing (Aperiodical LLC) and How Comics Are Made (Andrews McMeel Publishing).]

If you appreciate articles like this one, support us by becoming a Six Colors subscriber. Subscribers get access to an exclusive podcast, members-only stories, and a special community.


Search Six Colors