lawloretienne / ImageGallery

A gallery used to host an array of images
Apache License 2.0
645 stars 116 forks source link

Sometimes images don't load at all #9

Closed salmanbabri closed 8 years ago

salmanbabri commented 8 years ago

I tried using the sample code provided & couple of images weren't loading at all. I experienced the same issue when I tried running the ImageGallery-master.

Also the images failed to load when I provided the the path of local storage. Example the path was given in this pattern :-

/storage/sdcard1/DCIM/Camera/IMG_20160303_174756.jpg

limitfan commented 8 years ago

I also encountered your issue and I am just looking into this problem. To load images from local storage, you just need to provide correct path description like this pattern: file:///sdcard/DCIM/myimg.jpg

limitfan commented 8 years ago

The issue that some images cannot be loaded lies at the underlying image downloading and caching library called 'picasso'. Using the snapshot version of picasso in the following address https://oss.sonatype.org/content/repositories/snapshots/com/squareup/picasso/picasso/2.6.0-SNAPSHOT/ or from its latest source code should tackle most cases.

lawloretienne commented 8 years ago

As of version 0.0.14 , you will now be responsible for the image loading logic. See https://github.com/lawloretienne/ImageGallery/blob/master/sample/src/main/java/com/etiennelawlor/imagegallery/activities/MainActivity.java .