Messing with Expo Permissions caused ImagePicker to misbehave

Have you seen the following alert?

Sorry, we need media library permissions to make this work!

Well.. me too! 🙂 And I’ve seen this error despite the fact that I’ve had both the "CAMERA" and "MEDIA_LIBRARY" permissions added to my android.permissions array.

Googling didn’t help much, because it just led me to either the expo permissions docs or to the ImagePicker docs, from which it seemed that the needed permissions are already in.

Luckily, I started to dig through the expo GitHub issues, and found an issue by folks facing the same problem.

The solution is to add the “READ_EXTERNAL_STORAGE” and the “WRITE_EXTERNAL_STORAGE” to the permissions array, despite the docs listing them as ones that are added by default.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.