When working with images, you may want to restrict them in ways that will help keep your site optimized. While you may limit them in physical size, you may also want to restrict them as far as maximum file size. This will force the node creators to optimize images if they exceed the limit even if they fit within any size restrictions you may have set..

How to set maximum file upload size 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. Now that you are on the Content Types page, find the content type you want to set the image settings for. In our example, we will work with the Article type. Look tot he dropdown ont he right side of the Article row and Click on Manage Fields.
  6. You are now taken to the Manage Fields page. From here you see a list of the current fields for Article content types. Click on the Edit option from the dropdown to the right side of the Image field row.
  7. The Image Settings page appears, where you will need to find the Maximum Upload Size field. Here you can enter the maximum size you want any uploaded files to be. You may set the size by kb, MB, orFor our example, we are setting them at 2MB.
    Note:The maximum size entered here must first pass the settings in your php.ini file. This size setting is noted under the field itself. If you set a size here that is larger than the php.ini file setting, the file will be restricted by the php.ini setting. You may need to change your upload_max_filesize setting in your php.ini as well.
  8. Once you have entered your size restrictions for either one or both fields, click on the Save Settings button. Your new filesize settings will now be active.
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?

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.

News / Announcements

WordPress wp-login.php brute force attack
Updated 2014-07-17 06:43 pm EST
Hits: 200981

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

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!