Search code examples
androidandroid-glide

Glide not loading real image and stuck with placeholder


I have a pretty basic load image from server line code:

Glide.with(view.getContext()).load(url).placeholder(R.drawable.default_profile).into(view);

For some reason, I'm always stuck with the placeholder being displayed and never the real image!

I have made sure that a valid and working url is being passed. And, if I use the same code without the placeholder it works fine

Glide.with(view.getContext()).load(url).into(view);

Any ideas why?


Solution

  • Try to add .dontAnimate() It caused by TransitionDrawable too and it seems so because after scroll there's no animation because it's cached.

    The correct code is

    Glide.with(view.getContext()).load(url).placeholder(R.drawable.default_profile).dontAnimate().into(view);
    

    I hope it will be helpful for you.