how-to display an image living outside the public directory

You could have PrivateImagesController with show method

and you will get your images through /private_images/image_name.png

in show method

(check permissions) send_file “#{RAILS_ROOT}/private_images_folder/#{params[:image_name]}”

send_file is really slow and will work only when there’s not a lot of users requesting files

In Nginx you could use x-send-file option or something, which makes send_file work much better. I didn’t try that though.