IMCE File Manager imce

IMCE is an AJAX-based file manager that enables users to browse, upload, and manage files on the server with support for personal directories and user quotas.

195,242
sites
101
Stars
Drupal 9 · Drupal 10 · Drupal 11
Compatible
GNU General Public License, version 2 or later
License

Overview

IMCE (Image for TinyMCE) is a comprehensive file manager module for Drupal that provides an AJAX-based interface for managing files on the server. Despite its name originating from its initial purpose as an image browser for TinyMCE Editor, IMCE has evolved into a full-featured file management solution.

The module allows administrators to create configuration profiles that define folder access, file upload permissions, allowed file extensions, size limits, and disk quotas. These profiles can be assigned to user roles per file system (public, private, etc.), enabling fine-grained access control. Personal folders are supported through user tokens, allowing each user to have their own dedicated directory space.

IMCE provides a modern, responsive user interface with a folder tree navigation, file listing with sorting options, file preview panel, and toolbar buttons for various operations. The file manager supports uploading files, creating new folders, deleting files and folders, and resizing images. Integration is provided for CKEditor 5, BUEditor, and Drupal's native file/image field widgets, allowing users to browse and select files directly from these contexts.

Install

Drupal 11, 10, 9 v3.1.4
composer require 'drupal/imce:^3.1'

Features

  • AJAX-based file browser with folder tree navigation and file listing
  • Configuration profiles for role-based access control per file system
  • Personal folders using user tokens (e.g., [user:uid], [user:name])
  • File upload with validation for extensions, size limits, and image dimensions
  • File deletion with file usage checking to prevent deletion of files in use
  • New folder creation within accessible directories
  • Image resizing with copy option and dimension validation
  • Disk quota management per user
  • Thumbnail preview support using Drupal image styles
  • CKEditor 5 integration with image and link toolbar buttons
  • BUEditor integration as a configurable file browser
  • File/Image field widget integration with 'Open File Browser' button
  • Support for multiple file systems (public, private, S3, etc.)
  • Absolute and relative URL generation for files
  • Admin theme option for file manager paths
  • Session-based active folder memory

Use Cases

Personal user directories

Create personal file spaces for each user by configuring a folder path with user tokens like 'users/user[user:uid]'. Each user will only see and manage files in their own directory, with automatic folder creation on first access.

Role-based media management

Set up different access levels by creating profiles for content editors (full access to shared media folder), authors (upload-only access to their personal folder), and members (view-only access). Assign profiles to roles per file system.

CKEditor 5 image insertion

Allow content editors to insert images from the file server into content. Configure a text format with CKEditor 5, disable built-in image uploads, and use the IMCE image toolbar button. Users can browse, upload, and select images.

Private file downloads

Manage files in the private file system that require authentication. IMCE implements hook_file_download() to validate access, ensuring users can only download files they have IMCE access to.

Image gallery management

Configure a profile with image-only extensions (jpg png gif webp), image dimension limits, and resize permission. Users can upload images that are automatically scaled to maximum dimensions and manually resize existing images.

Multi-site shared storage

Use IMCE with S3 or other remote file systems by enabling 'URL altering' and 'lazy dimensions' options in the profile to handle remote file URLs correctly and improve performance.

Tips

  • Create a custom menu item at /imce to provide direct access to the file manager for end users
  • Disable CKEditor 5 image uploads to see the IMCE link in the image dialog, or use the dedicated IMCE Image toolbar button
  • Use the Duplicate operation to quickly create similar profiles with different settings
  • Enable thumbnail previews with caution as they can slow down the file browser with many images
  • Use role weight ordering to control which profile takes precedence for users with multiple roles (last assigned wins)
  • Enable 'Use admin theme for IMCE paths' if you experience UI issues with your front-end theme
  • Personal folders are created automatically when users first access them
  • The browser remembers the last active folder in the user session for convenience

Related Projects

ckeditor5 Core

Provides three CKEditor 5 plugins: ImceSelector for general file selection, ImceImage toolbar button for inserting images, and ImceLink toolbar button for inserting file links. Image uploads must be disabled in CKEditor for the IMCE image dialog link to appear.

bueditor

Integrates as a selectable file browser option in BUEditor editor configuration. Select 'Imce File Manager' under File browser settings.

file Core

Integrates with file and image field widgets. Enable 'Allow users to select files from IMCE File Manager for this field' in widget settings to show an 'Open File Browser' button.

token

Supports user tokens in folder paths for creating personal directories (e.g., [user:uid], [user:name]).

Admin Pages

Title Path Description
IMCE File Manager /admin/config/media/imce Main configuration page for IMCE that displays both the settings form and the list of configuration profiles. Administrators can assign profiles to user roles per file system and manage global settings.
Add configuration profile /admin/config/media/imce/add-profile Form for creating a new IMCE configuration profile that defines folder access, permissions, and file restrictions.
Edit configuration profile /admin/config/media/imce/{imce_profile} Edit an existing IMCE configuration profile.
Delete configuration profile /admin/config/media/imce/{imce_profile}/delete Confirmation form for deleting an IMCE configuration profile.
Duplicate configuration profile /admin/config/media/imce/{imce_profile}/duplicate Creates a copy of an existing configuration profile with a new name.
IMCE Help /admin/imce/help Help page with documentation and tutorial videos for configuring and using IMCE.
IMCE File Browser /admin/imce/browser Administrative file browser interface embedded in an iframe, allowing administrators to manage files directly.
File Manager /imce/{scheme} The main IMCE file browser interface. The {scheme} parameter specifies the file system (public, private, etc.). Defaults to the site's default file system when not specified.
IMCE File Browser (User tab) /user/{user}/imce User profile tab that displays the IMCE file browser for users whose assigned profile has the 'Display file browser tab in user profile pages' option enabled.

Permissions

Permission Description
Allows full access to IMCE administration including managing configuration profiles, accessing the admin file browser, and viewing the help page. This is a restricted access permission.

Hooks

Hook Description
hook_imce_supported_widgets_alter Allows modules to alter the list of supported file field widgets that can integrate with IMCE.
hook_imce_plugin_info_alter Allows modules to alter IMCE plugin definitions.

Security Notes

  • The 'administer imce' permission is restricted and grants full access to all file management features
  • Anonymous user access warning is displayed when configuring profiles for anonymous role
  • File usage checking prevents deletion of files referenced by content unless explicitly disabled
  • File name validation prevents directory traversal and special characters
  • CSRF token validation protects all AJAX operations
  • Personal folder paths with user tokens ensure users cannot access other users' directories
  • Files uploaded through IMCE are set as permanent and registered in the file_managed table

Meta

Author
ufku
License
GNU General Public License, version 2 or later
Security
Covered
Created
2006/08/19
Updated
2025/02/23