Finally fixed the way thumbnails are added to $scope.photoList.