code: public function setMimeType($mimeType)
      {
          if ($mimeType instanceof MimeType) {
              $this->mimeType = $mimeType;
          } elseif (is_array($mimeType)) {
              $this->mimeType = new MimeType($mimeType);
          } else {
              $this->mimeType = null;
              trigger_error('Argument must be an object of class MimeType. Data loss!', E_USER_WARNING);
          }
  
          return $this;
      }
docs: Sets the "mimeType" of the ImageTemplate.
  
  @param MimeType $mimeType
  
  @return ImageTemplate