Improve performance of photos page