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.
  2. Using the top menu bar, Menu Tab.
  3. Now a second menu bar will appear. Click on the Structure tab to continue.
  4. From here, click on the Content Types option from the Structure page.
  5. 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. 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. 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. 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.
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!