Created
January 19, 2018 13:26
-
-
Save QuentinFonteneau/651a6af653dbc478f9603d7b1b6d7603 to your computer and use it in GitHub Desktop.
Flush all image styles in Drupal 8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$imageStyle = \Drupal::entityTypeManager()->getStorage('image_style'); | |
$styles = $imageStyle->loadMultiple(); | |
foreach ($styles as $style) { | |
$imageStyle->load($style->get('name'))->flush(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment