Skip to main content

To Camera Roll

PhotoEditor SDK supports saving photos to the camera roll.

Import media library#

To retrieve access to the device's camera roll, we need to install and import the expo-media-library module. For further reference on how to set this up, please take a look at the official documentation.

Set an accessible export path#

Since we are using the expo-file-system module for deleting the exported photo after processing it, we need to save the photo in one of the directories that are supported by this module. Otherwise, the module will not be able to delete the files. For further reference on this, please have a look at the official documentation. Please note that you need to specify the file extension for Android, while it is automatically added for iOS.

Open the editor and save the photo to the camera roll#

Open the photo editor and handle the export result. To save the exported photo to the camera roll, open the editor and handle the export result. Then, use the expo-media-library to save the PhotoEditorResult.image.

Delete the temporary photo#

Delete the temporary export file after processing it.