compressToJpg function
Implementation
Future<Uint8List> compressToJpg(Uint8List bytes ) async {
final image = ImageFile(filePath: '', rawBytes: bytes);
final param = ImageFileConfiguration(input: image);
return ( await compressor.compress(param)).rawBytes;
}