— go to the documentation home page
MediaFlow documentation

Automatic Organization

Build and maintain Media Library folders from your own pages, posts and categories — so every file appears in the folder of the content that actually uses it.

Available onPro

Documents version1.5.1

Last updated

On this page

Automatic organization builds folders out of the content on your site and keeps them in step as that content changes. Instead of filing media by hand, you get a structure that mirrors your pages, posts and categories.

The shape it builds

pages
├── home
├── about-us
└── contact

posts
├── software-development
│   ├── custom-software-development-guide
│   └── software-development-cost
└── uncategorized
    └── a-post-with-no-category

products
└── plugins
    └── formflow

Every level is a WordPress slug: the post type root, then the taxonomy term chain, then the post itself. A post type with no grouping taxonomy — pages, normally — skips the middle level and files each item directly under its root.

Content with no term at all lands in <post type>/uncategorized.

Usage, not ownership

A file appears in the folder of every page and post that uses it. These are usage relationships, so one logo can sit under pages/home, pages/about-us and pages/contact at the same time — and it is still a single attachment.

That is also why an automatic folder never becomes an attachment’s manual home: the two answer different questions. See How folders work.

Turning it on

Go to Media → MediaFlow → Settings, to the Auto Optimize Organization section, and tick Enable automatic organization. It is off by default.

Nothing is built until you also choose at least one content type. Every option is covered in the Settings reference.

How folders are named

Folder names are WordPress slugs. Root folder names are derived from the post type name by a deterministic rule (page → pages, story → stories).

Two sources that would produce the same slug in the same place are told apart by appending the object ID — team-12.

Manual and automatic side by side

Automatic roots sit beside your own folders at the top level. Automatic folders carry an Auto badge; manual folders carry none. There is no separate “Automatic” root, because that would add a level of nesting to every path to say something the badge already says.

Where to go next