Seeding image derivatives

Handling large files

When a website has a large number of files, especially images, performance can suffer. Websites that experience performance issues should consider organizing files in subfolders. Whenever you're ready to move the files to new subfolders, be aware that Drupal will need to rebuild all the derivative images for the new location. This means that all thumbnails and other non-original-sized images will be recreated when a user requests the image for the first time.

Recreating these images in bulk can cause serious performance issues on a website, as image building takes significant processing time and power. If you are using Drush, however, you can use a script to rebuild the derivatives before the website goes live.

To use this script, complete the following steps:

  1. Save the file in the following link as seed_derivatives.drush.inc in your $HOME/.drush directory.

    Download this file

  2. From the command prompt, to ensure that the extension that was added with that file is available, run the following command:
    drush cache-clear drush
  3. Run the following command to get options:
    drush help seed_derivatives
  4. To generate derivatives, run the following:
    drush seed_derivatives

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
By submitting this form, you accept the Mollom privacy policy.

Contact supportStill need assistance? Contact Acquia Support