Instead of throwing error, give a JSON result when there isn't a photo