title: How do I validate base64 images in NodeJS/Express?
body: <p>Let's say I am creating a REST API with Node/Express and data is exchanged between the client and server via JSON. </p>
  
  <p>A user is filling out a registration form and one of the fields is an image input to upload a profile image. Images cannot be sent through JSON and therefore must be converted to a base64 string. </p>
  
  <p>How do I validate this is indeed a base64 string of an image on the serverside? Or is it best practice not to send the profile image as a base64?</p>