fluttercandies / flutter_image_compress

flutter image compress
MIT License
645 stars 218 forks source link

Webp iOS error when keepExif is true #170

Open jonasN5 opened 3 years ago

jonasN5 commented 3 years ago

Using v0.7.0, the following code produces an error:

    FlutterImageCompress.compressAndGetFile(file.path, _newPath,
        minWidth: _width,
        minHeight: _height,
        quality: 85,
        format: CompressFormat.webp,
        keepExif: true);

Xcode returns the following error with an iPhone8 simulator running iOS 14+:

[Runner] findWriterForTypeAndAlternateType:119 unsupported file format 'org.webmproject.webp'

Any chance this is a known issue and there is an easy fix? I've had no problems on Android.

EDIT:

After running some tests on a real iPhone, it turns out the above code works on iOS when I remove keepExif: true. keepExif: true does however work on Android.

bhanuka96 commented 3 years ago

flutter_native_image user this plugin instead