If you want to limit the loop to a certain number of items in:

service.photos.each do |photo|

You can do this:

service.photos[(0..2)].each do |photo|

And it will grab the first 3 photos in that array.

Also, you can have fun with .first and .last:

service.photos.first(3).each do |photo|