I am using Paperclip + s3 for image attachment. Is there a way to only store the styles and not the original image(in an attempt to reduce attachment save time and save storage space)?
I have seen a couple of post which suggest to use original as one of the style. It is not possible for me to do so, as i need the original to act as a reference for cropping. Link to one such post: How do I tell paperclip to not save the original file?
And also it is not possible to save original & delete it later as it kind of defeats the purpose.
Is there a setting which I am missing?
Thank you in advance.
There's a good resource here: Rails and Paperclip... don't save the original image, just the styles?
Delayed
In light of your findings & comment, you may wish to move the image processing to a backend job? Although I've not done this myself, there are resources such as the delayed_paperclip gem which allow you to push the processing part of Paperclip to a backend job
System
A note on system setup - I would personally accomodate the original image. If you're quibbling over storage space, unless you're facebook or instagram, your image space is not going to cause a big problem, especially considering S3 pricing is based on TB
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With