diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/multimedia/MultimediaImageFragment.kt b/AnkiDroid/src/main/java/com/ichi2/anki/multimedia/MultimediaImageFragment.kt index 2459692ec2a3..3f3a485b5f6e 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/multimedia/MultimediaImageFragment.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/multimedia/MultimediaImageFragment.kt @@ -274,9 +274,13 @@ class MultimediaImageFragment : MultimediaFragment(R.layout.fragment_multimedia_ } private fun handleImageUri() { + fun processExternalImage(uri: Uri): Uri? = internalizeUri(uri)?.let { Uri.fromFile(it) } + if (imageUri != null) { view?.findViewById(R.id.no_image_textview)?.visibility = View.GONE - handleSelectImageIntent(imageUri) + + val internalUri = imageUri?.let { processExternalImage(it) } + handleSelectImageIntent(internalUri) } else { handleSelectedImageOptions() }