1

I have some images I need to change in batches on the website.

For example, I want to replace all color header images with grayscale images.

What I did was subsitute the old images with the new ones in folder:

C:\patch\sites\default\files\styles\slideshow_1920_x_700_scale\public

Now the problem is that after doing this, even if I restart the computer(using aquia dev desktop), clear all caches ect...

The color images still show up on the website, even if the grayscale ones are in the folder.

The only way to get the grayscale images to show is to go in the content item, remove the image, and reload the identical grayscale one.

Is there a way to batch do this WITHOUT having to manually remove and re-upload?

What if I had to change 1000 images...?

1 Answer 1

1

Derivative images (the files that result from using Image Styles) are auto-generated; you need to replace the original image file, then flush the images already created for the style(s) you're interested in, so the derivatives be re-generated next time they're requested.

For the example path you've given, the originals will be in the root of the public file system (/sites/default/files), so just replace those with the new images, and flush the styles that use them.

Probably the easiest way to do the last part is to install the Image style flush module.

0

Your Answer

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

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