compress method
Compress image file input synchronously
On Flutter, you can run this compression on background using isolates with
ImageFile imageFile; Configuration config;
var compressedImage = await compute(imageFile.compress, config);
Implementation
ImageFile compress([Configuration config = const Configuration()]) =>
c.compress(ImageFileConfiguration(input: this, config: config));