Loading images from app assets using the Glide library
I switched my current project from Picasso to Glide. However, I am unable to load the image from the app assets. Is it possible?
String assetPath = "file:///android_asset/flags/FR.jpg"; Glide.with(getContext()) .load(Uri.parse(assetPath)) .placeholder(missingFlagDrawable) .centerCrop() .crossFade() .into(flag);
I have also tried the load (String) method with no success and I don't see a load method like InputStream or FileDescriptor that I could get with the AssetManager class.
This exact code worked in Picasso.
Glide works correctly in the rest of the app and loads nicely deleted images.
source to share