Virtual folder organization and smart management for the WordPress Media Library.
Way back in 2006 (almost 20 years ago!), I released ImageManager 2.0, a popular WordPress plugin for image management and editing. Media Manager is my modern take on media organization for WordPress, built with React and modern tooling.
Media Manager brings virtual folder organization to your WordPress Media Library. Organize your media files into hierarchical folders without moving files on disk—folders are virtual, so your URLs never change.
- Virtual Folders: Create hierarchical folder structures to organize media
- Drag & Drop: Easily move media between folders with drag and drop
- Sticky Sidebar: Folder navigation stays visible while scrolling through media
- Gutenberg Integration: Filter media by folder directly in the block editor
- Bulk Actions: Move multiple media items at once
- Keyboard Accessible: Full keyboard navigation support
- Internationalized: Ready for translation (Norwegian Bokmål included)
- WordPress 6.8 or higher
- PHP 8.3 or higher
- Download
mediamanager.zip - Upload via Plugins > Add New > Upload Plugin
- Activate the plugin.
Plugin updates are handled automatically via GitHub. No need to manually download and install updates.
# Add via Composer
composer require soderlind/mediamanager
# Install dependencies
composer install
npm install
# Start development build with watch
npm run start
# Build for production
npm run build
# Run PHP tests
composer test
# Run JavaScript tests
npm test- Go to Media > Library in your WordPress admin
- Click the folder icon next to the view switcher to show the folder sidebar
- Use the + button to create new folders
- Drag and drop media items onto folders to organize them
- Click a folder to filter the media library view
When inserting media in the block editor:
- Open the Media Library modal from a block (e.g., Image or Gallery block etc.)
- Use the folder sidebar to filter by folder
- Select your media as usual
mediamanager/
├── build/ # Compiled assets
├── docs/ # Documentation
├── includes/ # PHP classes
│ ├── class-admin.php
│ ├── class-editor.php
│ ├── class-rest-api.php
│ ├── class-settings.php
│ ├── class-suggestions.php
│ └── class-taxonomy.php
├── languages/ # Translation files
├── src/
│ ├── admin/ # Media Library UI
│ │ ├── components/ # React components
│ │ └── styles/ # CSS
│ └── editor/ # Gutenberg integration
├── tests/
│ ├── js/ # Vitest tests
│ └── php/ # PHPUnit tests
└── mediamanager.php # Main plugin file
The plugin provides REST API endpoints under mediamanager/v1:
GET /folders- List all foldersPOST /folders- Create a folderGET /folders/{id}- Get a folderPUT /folders/{id}- Update a folderDELETE /folders/{id}- Delete a folderPOST /folders/{id}/media- Add media to folderDELETE /folders/{id}/media- Remove media from folder
mediamanager_folder_created- Fired when a folder is createdmediamanager_folder_deleted- Fired when a folder is deletedmediamanager_media_moved- Fired when media is moved to a folder
mediamanager_suggestion_matchers- Customize suggestion matching logicmediamanager_folder_capabilities- Modify capability requirements
Generate translation files:
# Generate POT file
npm run i18n:make-pot
# Generate JSON files for JavaScript
npm run i18n:make-json
# Generate PHP files for faster loading
npm run i18n:make-phpContributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Write tests for new functionality
- Ensure all tests pass
- Submit a pull request
Media Manager is copyright 2025 Per Soderlind
Media Manager is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
Media Manager is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Extension. If not, see http://www.gnu.org/licenses/.
