---
title: "Magento 2: How to Provide Access to your Custom Folder in the Media Gallery"
url: "https://magecomp.com/blog/magento-2-provide-access-to-custom-folder-in-media-gallery/"
date: "2024-04-22T15:29:50+00:00"
modified: "2025-02-12T09:57:40+00:00"
author:
  name: "Dhiren Vasoya"
  url: "https://magecomp.com/"
categories:
  - "How To"
  - "Magento 2"
word_count: 375
reading_time: "2 min read"
summary: "Hello Magento Friends,"
description: "Learn the steps for Magento 2: How to Provide Access to your Custom Folder in the Media Gallery."
keywords: "How To, Magento 2"
language: "en"
schema_type: "Article"
related_posts:
  - title: "How to Move Apply Coupon to Sidebar in Magento 2 Checkout Page?"
    url: "https://magecomp.com/blog/move-apply-coupon-to-sidebar-magento-2-checkout-page/"
  - title: "Magento 2: How to Add a Custom Button in Page Builder"
    url: "https://magecomp.com/blog/magento-2-add-custom-button-page-builder/"
  - title: "How to set a Meta robot values for Custom extension page in Magento 2"
    url: "https://magecomp.com/blog/set-meta-robot-values-custom-extension-page-magento-2/"
---

# Magento 2: How to Provide Access to your Custom Folder in the Media Gallery

_Published: April 22, 2024_  
_Author: Dhiren Vasoya_  

![Magento 2 How to Provide Access to your Custom Folder in the Media Gallery](https://magecomp.com/blog/wp-content/uploads/2024/04/Magento-2-How-to-Provide-Access-to-your-Custom-Folder-in-the-Media-Gallery-1024x512.webp)

**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.
[![Magento version upgrade](https://magecomp.com/blog/wp-content/uploads/2025/02/Magento-2-Version-Upgrade-CTA-3.webp)](https://magecomp.com/services/magento-upgrade-services/)

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.
**app\code\Vendor\Extension\etc\config.xml**

Then add the code as follows
```
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
   <default>   
      <system>
         <media_storage_configuration>
            <allowed_resources>
               <media_gallery_image_folders>
                  <your_custom_folder_name>your_custom_folder_name</your_custom_folder_name>
               </media_gallery_image_folders>
            </allowed_resources>
         </media_storage_configuration>
        </system>
   </default>
</config>
```

[![Magento Malware Removal](https://magecomp.com/blog/wp-content/uploads/2025/02/Magento-Malware-Removal-CTA-3.webp)](https://magecomp.com/magento-malware-removal.html)

**NOTE:**

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**

![blog-systemconfig](https://magecomp.com/blog/wp-content/uploads/2024/04/blog-systemconfig.png)

**Output:**

![blog-mediagallary](https://magecomp.com/blog/wp-content/uploads/2024/04/blog-mediagallary.png)

## Conclusion:
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.
[![Magento 2 Speed & Performance Optimization Services](https://magecomp.com/blog/wp-content/uploads/2025/02/Magento-2-Speed-Performance-Optimization-Services-CTA-4.webp)](https://magecomp.com/magento-performance-optimization.html)

[**Hire Magento Developer**](https://magecomp.com/hire-magento-developer.html) to help you manage the media gallery of your Magento 2 store.
**Happy Coding!**


---

_View the original post at: [https://magecomp.com/blog/magento-2-provide-access-to-custom-folder-in-media-gallery/](https://magecomp.com/blog/magento-2-provide-access-to-custom-folder-in-media-gallery/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-09-29 08:26:06 UTC_  
