Picasso: Picasso not loading image from local file

Created on 9 Mar 2015  Â·  7Comments  Â·  Source: square/picasso

Here is the local file path
/storage/emulated/0/xxxxx/1425879337987.jpg

Here is the code
Picasso.with(getContext()).load(new File(local file path)).into(mImageView);

i use picasso 2.5.0

Most helpful comment

@sd6352051 it work perfect, good luck:

Picasso.with(context).load("file://"+path).config(Bitmap.Config.RGB_565).fit().centerCrop().into(imageView);

All 7 comments

you can view image by other app, example: this file mayble a text file but rename to "text.jpg"

@vuhung3990 this path from my gallery

@sd6352051 it work perfect, good luck:

Picasso.with(context).load("file://"+path).config(Bitmap.Config.RGB_565).fit().centerCrop().into(imageView);

@vuhung3990 you are right,thanks,but i use load(new File(local file path)) not worked.

@vuhung3990 hi

its worked
Picasso.with(context).load("file://"+path).config(Bitmap.Config.RGB_565).fit().centerCrop().into(imageView);

its not worked
Picasso.with(context).load("file://"+path).config(Bitmap.Config.RGB_565).centerCrop().into(imageView);
Why is that?

Very Thanks @vuhung3990 !

Was this page helpful?
0 / 5 - 0 ratings