title: Check that a byte array is an image
body: <p>I have a server endpoint in gin that receives an byte array.</p>
  <pre><code>func UploadImageHandler(c *gin.Context) {
      body, err := c.GetRawData()
  
      // how do I make sure this body byte array is image?
  }
  </code></pre>
  <p>I need to ensure that the byte array is an image.</p>
  <p>How would I be able to do this check in Go?</p>