Implemented photo pagination