Recently, the UTC Web Dev Team implemented the Media Replace module alongside the Media Delete module in Drupal to help tame the file management beast that often plagues busy websites. Managing and updating media files—especially those used in multiple places like PDFs, images, and logos—can quickly become a tedious task. The Media Replace module streamlines the process by allowing content editors to swap out a file within an existing media item without breaking links or re-uploading content across the site. The Media Delete module allows the editor to remove their own file. They are simple yet powerful tools that keeps your media library organized and your updates hassle-free.
Replacing a Media Item
- Go to the Media Library and locate the media item you want to update. Note: You can only edit files you own, files you’ve uploaded yourself. For additional help with files you do not own, please submit a ticket here.
- Click the Edit button for that media entity under “Operations”. If you don’t see the button, you do not have sufficient permissions.
- Scroll down to the second section. You’ll see a new “Replace file” option next to the current file field.

- Click “Choose File” to upload a new file.
- Make sure the toggle button is green for “Overwrite original file”
NOTE: When checked, the original filename is kept and its contents are replaced with the new file, which must have the same file extension as the original file. If unchecked, the filename of the replacement file will be used with any allowed file type and the original file may be deleted if no previous revision references it (depending on your specific site configuration). - Save the media entity.
The media file will now be replaced without changing the media entity’s ID, preserving all references across the site (e.g., in content, views, or blocks).
Tip: This is especially useful for PDFs, logos, or images that are reused in multiple places—no need to re-link them after an update!
Deleting a Media Item
- Navigate to Media Library and
- To remove one file:
- Locate the media item you want to delete.
- Click the dropdown arrow beside “Edit” for that media entity under “Operations” and select “Delete”. If you don’t see the button, you do not have sufficient permissions.
- Make sure the “Also delete the associated file?” toggle button is green.
- Confirm the deletion when prompted.
- Alternatively:
- Click “Edit” on a media item
- Click the three vertical dots on the button beside the “Save” button at the top.
- Click the “Delete” button.
- Make sure the “Also delete the associated file?” toggle button is green.
- Confirm the deletion when prompted.
- To remove bulk files:
- Filter by the Organizational Section if you desire to remove a bulk of files.
- Use the checkboxes to select one or more media items you want to delete.
- At the bottom of your screen, locate the blue region that contains the number of files selected and a “-Select-” dropdown.
- Choose “Delete media” and click “Apply to selected items”.
- Make sure the “Also delete the associated file?” toggle button is green.
- Confirm the deletion when prompted.
Deleting a media item also removes the associated file from the file system—helping keep your site clean and free of unused assets.
Caution: Media referenced elsewhere (e.g., in content or views) will be broken if deleted. Always double-check where a media item is used before removing it.