Simply put your photos in capistrano's shared folder and symlink it. To automate it, write a capistrano recipe like:
namespace :deploy do
after "deploy:setup", "deploy:pictures:setup"
after "deploy:symlink", "deploy:pictures:symlink"
namespace :pictures do
desc "Create the pictures dir in shared path."
task :setup do
run "cd #{shared_path}; mkdir pictures"
end
desc "Link pictures from shared to common."
task :symlink do
run "cd #{current_path}/public; rm -rf pictures; ln -s #{shared_path}/pictures ."
end
end
end
This recipe will create a pictures folder in capistranos shared folder on 'cap deploy:setup' and symlink it on each 'cap deploy'.
So if you already have created the pictures folder on the server and added some pictures, you may migrate it before run the command:
cd yourapp
mv current/public/pictures shared
ln -s shared/pictures current/public/pictures
I use another recipe for sync the contents of shared folders over several machines, you can get it from GitHub