The gallery will not crash when there are too many photos when scroll