MODX Community

Removing Unused Media

Hi,
We’ve been running MODX on our site for quite a while, with a (somewhat) large group of content editors. As a result, I’m sure that there are a lot of images on our site that are orphans (not being used by any resource). Is anyone aware of an extra or process that can help me figure out which assets in our media browser can be deleted safely?

Thanks for your help,
Gary

Not that I’m aware of. But MODX keeps track of the paths in the DB if you use them. In theory you can write a simple script to list your files, and match them in a DB search. If no link exist you unlink(delete) them.