I just wanted to know if there is some way to make Drupal 7 re-build all the images for a specific style. The image style is created after the pictures were uploaded. The module using this image style will be color box.
Even though I update, delete, re-create the style, no images are generated in the according folder on the webspace.

Do you have any idea?


2 Answers 2


You can use drush to re-build specific image styles. drush image-flush thumbnail will force the refresh of thumbnail styles; you can use drush image-flush to get a list of available styles to clear.

You can find more information on the Drush website.


I used to have problems updating images after image styles were changed. Images would remain the same size they were before the style updates. Then I realized the problem was with my template files. I used to have static references to images, in the styles directories, which was wrong.

Then I realized I should use a function to display those images. This is how I do it now:

<img src="<?php print image_style_url('large', $node->field_image[$node->language][0]['uri']) ?>" />

The 'large' attribute is the image style name, you can use 'medium', 'thumbnail' or whatever custom style you have defined.

This solved the problem for me. When displayed, images appear according to the latest definition I have applied.

I don't know how Colorbox handles images with styles. Anyway, I hope my answer helps you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.