Direkt zum Inhalt

Newsletter Serie mit 22 Ratschlägen zum Thema Online Marketing und Inbound Marketing.
Anmelden

 

Flush image styles the Drupal 7 way

 
Stage Image: 

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-flush This 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