Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Glide Library Loading Very Slow with GIF

I'm using Glide library to load GIF files into my app. Here is what I implemented:

Glide.with(context)
     .load(stringImage)
     .asGif()
     .diskCacheStrategy(DiskCacheStrategy.SOURCE)
     .into(postImage);

But for some reason the GIF files are loading with very slow frame. I tried to Google but I wasn't able to figure it out.

like image 820
Amazing Thing Avatar asked Jun 22 '17 15:06

Amazing Thing


1 Answers

Adding crossfade on local image drawable worked for me.

Glide.with(context).load(stringImage).asGif()
   .crossFade().diskCacheStrategy(DiskCacheStrategy.SOURCE).into(postImage);
like image 145
Chinthaka Devinda Avatar answered Sep 28 '22 11:09

Chinthaka Devinda