cordova-plugin-camera
cordova-plugin-camera copied to clipboard
Camera fails to edit the image
While trying to crop images in an Ionic application I get the warning "Image edit is not supported" I have;
- allowEdit: true,
- targetWidth: 300,
- targetHeight: 500
After saving I do not get any output in terms of a base64 string.
Experiencing the same issue with allowEdit. So far, have found Android 11 throwing the error, with other versions working, but have not yet fully completed testing.
Experiencing the same with the below setup.
Environment, Platform, Device Android 11 Cordova Android 9.1.0 cordova-plugin-camera 5.0.2
Taking the below wording into account from the readme file, could someone recommend a third party library or any third party application that would be compatible?
allowEdit is unpredictable on Android and it should not be used! The Android implementation of this plugin tries to find and use an application on the user's device to do image cropping. The plugin has no control over what application the user selects to perform the image cropping and it is very possible that the user could choose an incompatible option and cause the plugin to fail. This sometimes works because most devices come with an application that handles cropping in a way that is compatible with this plugin (Google Photos), but it is unwise to rely on that being the case. If image editing is essential to your application, consider seeking a third party library or plugin that provides its own image editing utility for a more robust solution.
Closing as stale
Unclear the environment of the OP, but yes, editing images depends on support of the underlying camera app. Not all android devices have a camera app assigned that includes image editing/cropping functionality.