Don't clear the current image if I don't have a place holder and load a new image #2461
Unanswered
SofiaTejerina
asked this question in
Q&A
Replies: 2 comments
-
Your best bet is to set the existing image as the placeholder to the new request. Alternatively you could use |
Beta Was this translation helpful? Give feedback.
0 replies
-
To solve this issue, in my project, I used an ImageRequest to download the image and save it to the cache, then transferred the image url through a state to the UI when it cached/failed; the result is that there is no downtime/placeholder when it's loading since its already haveve been cached. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I'm working on a project where I want to load an animated webp image, but how this image takes some time to be loaded I resolved to first load a static image, from a remote resource, to be shown while the animated webp is being fetched.
My issue is that when you load a new image using coil, the current want is removed until the new one is loaded.
I tried to avoid this by loading the webp on the cache first, passing the placeholder as null, loading the webp on the success event of the static image, among other things I tried, but I didn't succeed.
Do you know if there is some way to do this?
Beta Was this translation helpful? Give feedback.
All reactions