How to add subfolders in media library for better organisation?

Right now I cannot create any subfolder e.g. reviews, news, interviews etc. I have a lot of images in my media library and it’s messy.

How can I create some folders and reorganize the images there?


I too use have been using the Custom Upload Dir plugin that @sr83 mentioned to organise images and other upload files. It’s a useful solution, although not as flexible as I would like.

It does provide a really great range of placeholders to build the folder path dynamically – including %file_ext%, %post_id%, %author%, %postname%, %post_type%, %year%,
%monthnum%, %current_user%, %category%, etc -, however that structure remains set and cannot be modified on-the-fly during upload.

I find this helpful as a general day-to-day setting for authors contributing posts, but I find that I need to change the setup when I want to upload core static page images etc, then change it back again.

The following post provides some pointers for creating your own upload handler that – along with looking at how Custom Upload Dir plugin works – might give you the necessary pieces to build something more flexible yourself:

Specific upload folder for PDFs in custom Post type in WP multisite

Leave a Comment