Search code examples
androidpicasso

Picasso Load image from filesystem


Can I use Picasso library to load images from the filesystem?

I'm using startActivityForResult to let the user pick a photo from his gallery, and then want to show the selected image.

I already have working code to get the image filesystem Uri, but can't get the Picasso.load() method to work.


Solution

  • Of course you can. Its actually pretty straight forward:

    File f = new File("path-to-file/file.png");
    

    or

    File f = new File(uri);
    
    Picasso.get().load(f).into(imageView);
    

    also

    Picasso.get().load(uri).into(imageView);
    

    works