Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to remove existing style dimensions in paperclip

I know you can add new styles to paper clip and then use process! method to force paperclip to fill in the missing styles. But what if you want to ditch the old styles that you are not using any more.

For example I have styles iphone and ipad, and I changed my mind and would instead like :large and :medium with slightly different dimensions instead of :iphone and :ipad.

In particular I'm hosting my images on s3 since my app is on heroku. I would like to remove all the folders on s3 pertaining to :iphone and :ipad styles. Is there a rake task for removing select styles?

like image 344
Homan Avatar asked Aug 31 '25 20:08

Homan


1 Answers

If you are referring to removing invalid files, try:

rake paperclip:clean  # Cleans out invalid attachments.

You can view all paperclip tasks in your console by typing:

rake -T paperclip
like image 92
dnatoli Avatar answered Sep 03 '25 23:09

dnatoli