Android Fresco Uri Load Image From File

September 25, 2019
val filepath = "/storage/emulated/0/DCIM/Camera/20190604_142528.jpg"
val uri = UriUtil.getUriForFile(File(filepath))

or

val filepath = "/storage/emulated/0/DCIM/Camera/20190604_142528.jpg"
val uri = Uri.parse("file://" + filepath)

or

val filepath = "/storage/emulated/0/DCIM/Camera/20190604_142528.jpg"
uri = Uri.fromFile(File(filepath))

Usage

draweeView.setImageURI(uri)
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.