Kopfzeile

Flush image styles the Drupal 7 way

Flush image styles the Drupal 7 way

You want to flush your image styles in Drupal 7? There is no more User Interface like there was in Drupal 6 with the Imagecache UI module. But there is an easy way to rebuild the cache with drush: drush image-flushThis will generate a list of options with all your defined image styles For more info run drush help image-flush When you have the devel module installed you could also run this code snippet

<?php
// Flush an image style in Drupal 7.
  image_style_flush('STYLE_NAME');
?>

Or if you want to regenerate all preview images then run

<?php
// Flush all image styles in Drupal 7.
foreach (image_styles() as $style) {
  image_style_flush($style);
}
?>

Read more in the image documentation

Neuen Kommentar hinzufügen

Ihr Experte

Gründer NETNODE AG, Digital Consultant