code: function info(buf, cb) {
    setTimeout(() => {
      const info = (0, _imageinfo2.default)(buf);
      if (!info) {
        cb(new Error('Cannot get image info'));
      } else {
        cb(null, {
          type: info.type,
          mimeType: info.mimeType,
          extension: info.format.toLowerCase(),
          width: info.width,
          height: info.height
        });
      }
    }, 0);
  }
docs: Get image information
  @param {Buffer} buf Image or image part that contains image parameters
  @param {function} cb Callback to invoke on completion