Changed sort by picture to check actual picture instead of photo path