I'm saving pictures with the help of expo image picker and axios, but the base64 storage part in the database is very long and naturally it takes a long time to load when listing the images on a screen. What can I do to make images load faster?
Example code:
const PickImage2 = async () => {
allowPhotoRequests()
let result = await ImagePicker.launchImageLibraryAsync({
mediaTypes: ImagePicker.MediaTypeOptions.All,
allowsEditing: true,
aspect: [4, 3],
quality: 0.5,
base64: true
})
if (!result.cancelled) {
setImage('data:image/jpg;base64,' + result.base64)
}
}
Example image output:
data:image/jpg;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAACAASURBVHic7N13nFxV3cfxzzn33mm7szVbUjYhCSGFFAhVQomidEQEBR6Qpg8gIvYHxA764AMWrI8FG1hA9FHpRR