diff --git a/az_quickstart.install b/az_quickstart.install index 5a61766261..7bf60e798b 100644 --- a/az_quickstart.install +++ b/az_quickstart.install @@ -42,6 +42,7 @@ function az_quickstart_install() { $extra_modules = [ 'pantheon_advanced_page_cache', 'environment_indicator', + 'imagemagick', ]; } else { @@ -217,3 +218,19 @@ function az_quickstart_update_1020901(&$sandbox) { $sandbox['#finished'] = empty($sandbox['max']) ? 1 : $sandbox['progress'] / $sandbox['max']; return t('Updated langcode on %count menu links.', ['%count' => $sandbox['progress']]); } + +/** + * Ensure Pantheon sites have the imagemagick module installed. + */ +function az_quickstart_update_1021101() { + if (defined('PANTHEON_ENVIRONMENT')) { + try { + \Drupal::service('module_installer')->install(['imagemagick']); + } + catch (MissingDependencyException $e) { + return t('ImageMagick module not available to install.'); + } + + return t('ImageMagick module installed.'); + } +}