Skip to content

Instantly share code, notes, and snippets.

View jimconte's full-sized avatar
🏠
Working from home

Jim Conte jimconte

🏠
Working from home
View GitHub Profile
@jimconte
jimconte / seed_derivatives.drush.inc
Last active December 5, 2023 13:23 — forked from typhonius/seed_derivatives.drush.inc
This script can generate image derivatives for Drupal for warming up the filesystem prior to going live. Image derivative generation puts an amount of load on the servers so it images have been migrated from another server with no derivatives, it may be useful to pre-generate using this script.
<?php
use Drupal\Core\Database\Database;
use Drupal\Core\Database\Query\Condition;
use Drupal\image\Entity\ImageStyle;
use Drupal\file\Entity\File;
/**
* ================================================================
* Implements hook_drush_command().
* ----------------------------------------------------------------