I have an image style in Drupal 7. I attached several images to a nodes and display the images based on this style. I then changed the effects on this image style but the existing images are not being recreated with the new image style effects. They show with the old image style effects.
If I attach new images, they use the new effects. Deleting an existing image and re-uploading causes the image to use the old effects.
The manual (incorrectly I assume) states that just saving an image style causes a rebuild: http://drupal.org/documentation/modules/image
I have cleared the cached.
How do I force a rebuild?
Clearing cache, won't flush image styles: http://drupal.org/node/997332
rm -rf sites/default/files/styles
To flush Image Style Names in Drupal 7 through the UI, try this contrib module:
It gives you a flush option for each Image Style Name. It also has an option to flush all the Image Style Names at once.
Once the module is enabled, in the admin UI go here to flush a particular image style:
This is a bug with image styles. If you are editing an image style and edit an effect that is already present, the images will not be flushed on update. However, if you delete that effect (I'm not talking about deleting the image style - delete the effect within the particular image style) and create a new one, the images will be flushed on update.
There is another, easier way. It's more a replacement than update, but it works fine. You can create a new image style based on the old one, but with new features (image actions) you wish. Then delete the old style; on the deletion confirmation page, you will find a drop list with available image styles, which you can use to replace the old one. This is a standard image style replacement function, I assume.
Edit the style you want from admin/config/media/image-styles.
Click on 'update style' button on bottom, that will flush all the existing generated images in style folder and create new ones.
if u have a custom template and wanna force style for an image field :
$style='full_content_width'; $path=$node->my_img_field['und']['0']['uri']; $style_url = image_style_url($style, $path); print "<img src=".file_create_url($style_url)." >";
Just for information in Drupal 8 you have an "flush" option in the "Edit" dropdown in /admin/config/media/image-styles you can flush one by one.
If you are using Drupal Console (and let's face it, why not?) then you can use:
drupal image:styles:flush image_style
drupal isf image_style