Optimizing file sizes of large images in Drupal 7

Drupal
March 8, 2023

Did you know you can optimize the file size of your images right inside Drupal 7 using the File Browser? There’s really no need to mess around with image editing software!

Here’s how:

  1. Log in to Drupal 7 and click your user ID or name in the top right corner.
  2. Click the ‘File browser’ tab.
  3. Click the ‘sections’ folder, then find the folder for your department.
  4. Click the heading for the ‘Size’ column to sort your files by file size. If you find that you have any images that exceed 2MB, they should be resized.
  5. Click the file name once, then click the ‘Resize’ button in the File Browser. A dialog box will appear where you can specify the new image dimensions. Most full-width images should have a maximum width of 800 pixels. Images that are not full width should have a maximum width of about 350 to 400 pixels.
  6. Enter the new width for your image, then click in the ‘height’ box and the height will adjust to the proportion of your original image.
  7. Make sure that ‘Create a new image’ in unchecked, then click ‘Resize’. Note that images that are very large in size will likely produce an error in the back-end of Drupal. You can check the status of your resizing job by clicking the red question mark icon in the top right corner of the File Browser.
  8. Click the ‘x’ on the resizing dialog box to return to the File Browser to confirm the file size has been reduced below 2MB.
  9. Visit the web page where your image is displayed to make sure it displays correctly.

And that’s it! Feel free to optimize all your images to ensure they are all an appropriate file size for the web.

Always remember that images uploaded to the UNBC website should not exceed 2MB in size. Full-width images should be a maximum of 800 pixels wide. Images that are displayed beside paragraphs should be a maximum of 350 to 400 pixels wide.

One caveat: the ‘Resize’ feature only works for image files (e.g. .jpg, .png) and will not work for optimizing the file size of other file types (e.g. .pdf, .docx).

Happy Drupalling!

Contact Information