node image validation stuff