question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to get cache image file path

See original GitHub issue

I have a viewpager which is filled with images,now I want to get UIL cache image. Refer to my comments of issue #508 , UIL can’t resolve my requirement. I use ListView to load images, viewpager to display original image, viewpager has 9 items. So, when instantiate viewpager item , I use AsyncTask to query cache image and decode image file. I have read issue #420 , try below three method.

File file = DiscCacheUtil.findInCache(url, imageloader.getDiscCache());

File file = imageloader.getDiscCache().get(url);
String path = com.nostra13.universalimageloader.core.download.ImageDownloader.Scheme.FILE.wrap(url);

But, I can’t get all files successfully everytime, always only two files. If switch viewpager back and forth, all files is null or not exist, viewpager doesn’t display any content.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
nostra13commented, Jul 15, 2014

What about this:

File file = DiscCacheUtil.findInCache(url, imageloader.getDiscCache());

File file = imageloader.getDiscCache().get(url);
String path = com.nostra13.universalimageloader.core.download.ImageDownloader.Scheme.FILE.wrap(url);

Why do you assign file var 2 times? What is url? “http://…”?

0reactions
Ankurjain30commented, Dec 29, 2016

how can i set this path to imageview now?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting file path of image cached on disk · Issue #339 - GitHub
If would be nice if there was an easy way to get the file path of an image that is cached on disk....
Read more >
How to get path from cached images network in flutter?
To find the path you need to access the file through the cache manager. import 'package:flutter_cache_manager/flutter_cache_manager.dart'; ...
Read more >
How to get cache images path - magento2
I've made a bash command to get the cache image file and delete it (optionally). I leave the source code below, maybe it...
Read more >
How to get the path of cached image file? - MSDN - Microsoft
You can find the browser control's last navigated document Url by subscribing to the DocumentComplete event.
Read more >
cached_network_image | Flutter Package - Pub.dev
The cached network images stores and retrieves files using the flutter_cache_manager. FAQ #. My app crashes when the image loading failed. (I know,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found