add conditional parameter photo in create photo