Prerequisites
Before starting, ensure that you have installed the UmbraCare.DedicatedMediaFolder package via NuGet:
This package provides an API for quickly creating dedicated media folders for content nodes in Umbraco.
Step 2: Building a Simple RenderController with Media Folder Integration
For demonstration, I'll create a simple controller and inject IDedicatedMediaFolderHelper.
This controller will be responsible for creating a dedicated media folder automatically when a page is accessed.
Step 3: Verifying the Created Mirror Media Folder
-
Visit the URL of the content page in your browser.
-
The RenderController will execute and automatically create a corresponding media folder in the Umbraco backoffice.

Debugging: The Mirror Media Folder was created successfully for the content node
-
Navigate to the Media section in Umbraco.
-
You should see a newly created media folder that mirrors the content page.

Comparing Umbraco Media vs Content Tree View
How IDedicatedMediaFolderHelper Simplifies Media Management
Here's a quick overview of IDedicatedMediaFolderHelper's capabilities:
Method | Description |
---|---|
IMedia Get(int contentId, bool createIfNotExists, bool assignByRelation = true); | Fetches the media folder linked to a content node by its ID. Can create it automatically if needed. |
IMedia Get(IContent content, bool createIfNotExists, bool assignByRelation = true); | Retrieves the media folder for a given IContent instance, with an option to create it if necessary. |
IMedia Get(IEnumerable<string> expectedMediaTreeFolderNames, bool createIfNotExists); | Creates or retrieves a structured media folder based on a predefined folder structure. |
bool TryGetByRelation(int contentId, out IMedia dedicatedMediaFolder); | Attempts to find a media folder using relations. |
Understanding Scoped Dependencies in IDedicatedMediaFolderHelper
By default, IDedicatedMediaFolderHelper is registered as a scoped service in Umbraco.
This means that it is instantiated once per request and disposed of when the request ends.
In more advanced scenarios, such as automated migrations from an old CMS, you might need to retrieve IDedicatedMediaFolderHelper manually via IServiceProvider.
This allows you to create media folders automatically outside the standard request scope.
Here is a pseudo-code:
Conclusion
The Dedicated Media Folder package is a complete solution for structuring the media library in Umbraco.
Especially for enterprise-level projects with thousands of pages, where keeping media assets structured is critical for performance and maintainability.
As a developer, you gain access to a fully-featured API that offers precise control over folder creation and management.
Meanwhile, editors can use an intuitive UI to create folders with just a single click.
💡For a detailed overview of its key features, watch the demonstration video below:
📽️ Video URL: https://www.youtube.com/embed/X5JSkJaag4E
What's Next?
If you haven't tried it, now's the perfect time to install the UmbraCare.DedicatedMediaFolder free version.
The free version has small limitations, while the full version requires a license purchase from UmbraCare.