Ionic Image Resizer not working on Android Oreo

Recently I’ve been having issues using the Image Resizer plugin from Ionic 3. As the title says, it does not work on devices that run Android Oreo. I’ve tried on older versions, like Nougat 7.0, and works fine.

This is my code:

 async resizeImage(uri: any) {
        let options = {
          uri: uri,
          folderName: 'myApp',
          quality: 20,
          width: 250,
          height: 250
        } as ImageResizerOptions;

    return await this.imageResizer
      .resize(options)
      .then((filePath: string) => { 
        // it does not execute this function
        return filePath 
      })
      .catch(e => {
        // It runs the catch() section insted of then()
        console.log(e)
      });
  }

This is the error thrown by the catch clause:

Attempt to invoke virtual method ‘java.lang.String android.net.Uri.toString()’ on a null object reference

This is my Ionic Info:

cli packages: 

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 6.5.0

local packages:

    @ionic/app-scripts : 1.3.7
    Cordova Platforms  : android 6.4.0 browser 5.0.3 ios 4.3.1 windows 4.4.2
    Ionic Framework    : ionic-angular 3.2.1

System:

    Android SDK Tools : 26.1.1
    Node              : v7.10.1
    npm               : 5.8.0
    OS                : Windows 7

I’ve already tried reinstalling the plugin.

Any tips on how I can fix this?

First thing I would suspect is the changes to the permission system. See this article for some launching points to further resources.

Have you contacted the plugin author or check its issues log?