---
title: "Adding a subfolder to image upload directories in Drupal 8"
description: "When you upload images for an image field in Drupal 8, they will be stored in one of two default folders, sites/default/files/field/image (for those with the image field enabled by default) or..."
url: https://www.inmotionhosting.com/support/edu/drupal/add-subfolder/
date: 2013-11-27
modified: 2021-08-16
author: "Scott Mitchell"
categories: ["Drupal"]
type: post
lang: en
---

# Adding a subfolder to image upload directories in Drupal 8

When you upload images for an image field in Drupal 8, they will be stored in one of two default folders, *sites/default/files/field/image* (for those with the image field enabled by default) or */sites/default/files* (for all others). You may want to set up subfolders to further organize your images. For example, if you have a *Product* content type you may want to have these images stored in a *products* folder. Follow the instructions below as we show you how to assign subfolders to your image fields so you can give your images a more efficient structure.

## How to add subfolders to image directories in Drupal 8

1. [Log into your Drupal 8 admin interface](/support/edu/drupal/how-to-log-into-the-drupal-admin-dashboard/).  
2. [![](https://www.inmotionhosting.com/support/wp-content/uploads/2013/11/edu_Drupal-8__common-images_select-menu.png)](/support/wp-content/uploads/2013/11/edu_Drupal-8__common-images_select-menu.png)Using the top menu bar, **Menu** Tab.  
3. [![](https://www.inmotionhosting.com/support/wp-content/uploads/2013/11/edu_Drupal-8__common-images_select-structure.png)](/support/wp-content/uploads/2013/11/edu_Drupal-8__common-images_select-structure.png)Now a second menu bar will appear. Click on the **Structure** tab to continue.  
4. [![](https://www.inmotionhosting.com/support/wp-content/uploads/2013/11/edu_Drupal-8__common-images_select-content-type.png)](/support/wp-content/uploads/2013/11/edu_Drupal-8__common-images_select-content-type.png)From here, click on the **Content Types** option from the *Structure* page.  
5. [![](https://www.inmotionhosting.com/support/wp-content/uploads/2013/11/edu_Drupal-8_108_add-subfolder_1-select-manage-fields.png)](/support/wp-content/uploads/2013/11/edu_Drupal-8_108_add-subfolder_1-select-manage-fields.png)This brings you to the *Content Types* page. Choose the content type you will be working with. We will be using a new content type we created named *Products*.  
6. [![](https://www.inmotionhosting.com/support/wp-content/uploads/2013/11/edu_Drupal-8_108_add-subfolder_2-select-edit.png)](/support/wp-content/uploads/2013/11/edu_Drupal-8_108_add-subfolder_2-select-edit.png)Next is the *Manage Fields* page for our *Product* content type. Click on the **Edit** link on the dropdown to the right side of the *Image* row.  
7. [![](https://www.inmotionhosting.com/support/wp-content/uploads/2013/11/edu_Drupal-8_108_add-subfolder_3-add-subfolder.png)](/support/wp-content/uploads/2013/11/edu_Drupal-8_108_add-subfolder_3-add-subfolder.png)Finally, we arrive on the *Image Settings* page where we will look for the field entitled **File Directory**. Since this is a custom content type, the default directory for the image upload will be */sites/default/files*. This is represented by a blank **Files Directory** field. We are going to add a subfolder for our products by entering *products* in the field name.  
8. [![](https://www.inmotionhosting.com/support/wp-content/uploads/2013/11/edu_Drupal-8_108_add-subfolder_after.png)](/support/wp-content/uploads/2013/11/edu_Drupal-8_108_add-subfolder_after.png)Once you have entered the new subfolder name in the *File Directory* field, click on the **Save Settings** button at the bottom of the page. Now, when you upload an image when creating a new content node of the *Product* type, it will be stored in the */sites/default/files/products* folder. Here you see a screenshot of the new *products* folder in the site structure.  
