Search code examples
ruby-on-railspapercliprmagick

How do I throw away the original image file and just keep the resizes with Paperclip and Rails 3?


I am using Paperclip to, among other things, allow a registered user to upload an avatar for use on thier profile. I want to store a big and small version of the image which will be rmagicked to standard sizes. Now, what i want to do, is store these two standard sizes (:normal and :tiny, for example.) but I do not want to store the :original.

This will be nice for several reasons as I will never display or use any version than the two standard (re)sizes.


Solution

  • What is your reasoning for wanting to delete the files? File storage is so cheap now, that it's not really a valid reason anymore.

    I would advise against deleting the original files. If you ever decide you want to resize the files using Paperclip's rake tasks, you will need the originals.