I’m creating a rails application which will include several images for different models.
Now I want to organize them and maybe even use rails assets pipeline to add some caching.
I don’t think putting the images in the app/assets/images is a good idea ;).
So how should I do it?
I already tried storing my images in a subdirectory of the public directory.
But then I get a routing error like this :
ActionController::RoutingError (No route matches [GET] "/public/links/link.png")
Now I’m asking an experts advise.
Where can I put my images?
Whats your experience? Is it difficult to use the asset pipeline, or is this generally not a good idea? I could also use a CDN but I think this would be overkill for me right now.
Any advise would be very much appreciated.
Thanks!
I could advice you to use image uploader like Carrierwave or PaperClip . They are created to simplify all the process uploading image in Rails app. Take a look at this railscast. There are a lot of config possibilities about storage – localy , S3 , RackSpace etc.