Images not loading in Fresco

Try this

SimpleDraweeView imageView= (SimpleDraweeView) v.findViewById(R.id.full_ad_unit);

Uri imageUri = Uri.parse(imagePath);

ImageRequest request = ImageRequest.fromUri(imageUri);

DraweeController controller = Fresco.newDraweeControllerBuilder()
    .setImageRequest(request)
    .setOldController(imageView.getController()).build();

Log.e(TAG, "ImagePath uri " + imageUri);

imageView.setController(controller);

I don't know the logic but Fresco prefers to get the Uri from a file. First convert your uri to a file and then get Uri from that file. It works for me on local storage.

public static void loadImg(final Context c, final SimpleDraweeView view, final String img){
    Uri uri = Uri.parse("https://placekitten.com/g/201/300");
    view.setImageURI(Uri.fromFile(new File(uri)));
}

Tags:

Android

Fresco