Skip to content
Snippets Groups Projects

Issue #3451915: Switch from Driamge to Driamge Improved in Varbase Bootstrap Paragraphs

1 file
+ 7
0
Compare changes
  • Side-by-side
  • Inline
@@ -53,8 +53,15 @@ function varbase_bootstrap_paragraphs_preprocess_paragraph(&$variables) {
if (substr($url, -1) === '/') {
$url = substr($url, 0, -1);
}
if (\Drupal::moduleHandler()->moduleExists('drimage')) {
// Display Edge-to-Edge auto) fall back default background image using Drimage.
$file_path = $url . '/drimage/1600/0/' . $target_id . '/-' . $url . \Drupal::service('file_url_generator')->generateString($file->getFileUri());
}
elseif (\Drupal::moduleHandler()->moduleExists('drimage_improved')) {
// Display Edge-to-Edge auto) fall back default background image using Drimage.
$file_path = $url . '/drimage_improved/1600/0/' . $target_id . '/-' . $url . \Drupal::service('file_url_generator')->generateString($file->getFileUri());
}
}
}
}
Loading