Closed valentinjahanmanesh closed 8 years ago
Hi, there is no option for this currently. It has been already asked at #8 so this is probably the feature worth implementing. We could do something like this:
scrollView.auk.settings.nextPagesToPreload = 2 // Default is 0.
This will ask Auk to start loading the next two images from the current one. For example, if we are viewing the first image it will preload 2 and 3. If we are viewing 5th, then it will load 4 and 6 (unless they already loaded). It would also need to be smart about cancelling the load requests as well. Right now if the images has not finished loading and user switch to the next, the network request for that image is cancelled (to give way for the current image to load quickly). This will need to be taken into consideration as well.
I have experimented with concurrent loading of images in the past and found that it is sometimes better to load images one by one rather than many at the same time. When you are outside of the WiFi and there is bad connection (which frequently happens on mobile), it is better to show just one first image quickly than spread this thin bandwidth on say 5 images. Either way, this could also be controller with an option:
scrollView.auk.settings.preloadImagesSimultaneously = true // Default is false.
that would be great and i'll wait for those options <3 thanks good job, keep moving
Thanks, @farshadjahanmanesh
I will keep this open until it is implemented.
The image preload settings has been implemented.
// Set the property before showing remote images
scrollView.auk.settings.preloadRemoteImagesAround = 1
More info here: https://github.com/evgenyneu/Auk#preloading-remote-images
Thanks for your feedback, @farshadjahanmanesh, I think it can be useful to many people.
hi i dont know if this lib could predownload remote images...mean, while user see the first image, other images in scrollview,download concurrently to speed up showing the images
is there any option for that?