Hello Magento Friends,

In the current Magento 2 tutorial, I will describe the steps to Provide Access to your Custom Folder in the Media Gallery for your Magento 2 store.

When it comes to managing media files in Magento 2, the default setup includes folders like ‘catalog,’ ‘product,’ and ‘category,’ which organize images and videos related to products and other store elements. However, there are times when you may need to create custom folders to organize media files for specific purposes, such as marketing campaigns, seasonal promotions, or user-generated content.

While creating custom folders is relatively straightforward, ensuring they are accessible through the Magento 2 admin panel’s media gallery interface requires a few additional steps. In this guide, we’ll walk you through the process of providing access to your custom folder in the media gallery, empowering you to streamline your media management workflow.

Steps to Provide Access to your Custom Folder in the Media Gallery for Magento 2:

Step 1: We need to create a “config.xml“ file inside our extension at the following path.


Then add the code as follows


If you want to provide access to your old images in the media gallery, you need to enable the following admin configuration:

Stores > Configuration > Advanced > Media Gallery > Enable Old Media Gallery





By following these steps, you can seamlessly integrate custom folders into Magento 2’s media gallery, providing a centralized location for managing your store’s media assets. Whether you’re organizing images for marketing campaigns, user-generated content, or any other purpose, this customization empowers you to maintain a tidy and efficient media management workflow within your Magento 2 store.

Hire Magento Developer to help you manage the media gallery of your Magento 2 store.

Happy Coding!

Click to rate this post!
[Total: 0 Average: 0]