Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reprocessing images in Carrierwave

Let's say my model has an image with :thumb and the client wants :tiny and :nano thumbnails.

How do I reprocess all the existing images using a rake task?

I've found a rake task that I thought would do it https://gist.github.com/777788 but it's giving me errors.

like image 806
Joseph Le Brech Avatar asked Jan 30 '12 14:01

Joseph Le Brech


1 Answers

According to the Carrerwave documentation you can use following commands:

Model.all.each do |model|   model.image.recreate_versions! end 
like image 155
Mikhail Nikalyukin Avatar answered Oct 06 '22 14:10

Mikhail Nikalyukin