How to set max image upload file size in Drupal 7Written by Scott Mitchell
In your Drupal 7 dashboard, there are many settings that you can customize when working with images, such as setting maximum or minimum image sizes. Another related setting you may want to set is the maximum upload size. This setting allows you to set a maximum file size for images to be uploaded. This way you can control the images to ensure that no files larger than a specific size are uploaded by your users. Setting the max image size is easy to do in the Drupal 7 admin area and is done by following these instructions.
Modifying the maximum image upload size in Drupal 7
- Log into the Drupal 7 admin dashboard.
- Using the top menu bar, locate and click on the Structure option.
- From this next page, click on the Content Types link.
- On the Content Types page, find the content type you are going to work with and click on the Manage Fields link. In this case, we are working with Basic Pages.
- Find the Image row and then click on the Edit link to take you to the settings page.
- On the settings page, scroll down and find the Maximum Upload Size setting. It is blank by default. This means that it will follow the setting max_upload_setting for php on your hosting account instead. Set your desired setting here. If you want it to be in kilobytes, simply put the number. For example '512' for 512 kilobytes. If you want to express the number in Megabytes, simply put the number, followed by a space, then 'MB'. For example, if you set it to 10 Megabytes you would enter '10 MB' as in our example below.
Note that the notation below the Maximum Upload Size field states the current maximum of your php.ini as well. If you set the field to be a larger file size than the php.ini, it will cap it at the php.ini setting. If you need a larger setting, you will need to alter your php.ini file setting for upload_max_filesize.
- Click on the Save Settings button at the bottom of the page to save your new file upload maximum.