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:
- Save the file in the following link as
- 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
- Run the following command to get options:
drush help seed_derivatives
- To generate derivatives, run the following: