I would also recommend using the paginator gem instead of the built-in
pagination of Rails. It is much more efficient. SInce I swapped them
out, I've had no problems.
Also if you have all your images in the database, this could be the
main cause for the slowness, send back so much data can take a while,
even if the actual query is quick. I don't know it would be possible,
but consider maybe using Amzon S3 service if your number of image will
increase and the number of requests increase. Then just keep a
reference of the names in database, this should inprove the
effecientcy more.