Paperclip fetch image directly via url
It's it possible to fetch an image via url using PaperClip ? It's possible with fleximage, but fleximage has no support for Rails3 so I've switched over to paperclip. At present, I'm fetching the image via curl, saving it on the hdd and load it via image_file of paperclip. I've found no real solution via google, so hopefully you can help me. Yes this is possible and amazingly simple. In your model: #we use this to get the image. require 'rest-open-uri' Class Model << ActiveRecord::Base has_attached_file :picture #Get the picture from a given url. def picture_from_url(url) self.picture = open