Map<String, dynamic> toJson() => byteBuffer != null ? {'content': base64Encode(byteBuffer!.asUint8List())} : { 'source': {'imageUri': imageUri} };