Android Glide is a image loading library for Android that supports loading, caching, fetching, decoding, and displaying of images, animated GIFs, and video stills. Use this tag for questions involving the Glide library making sure to provide the version of the library used and the specific feature like [caching], [loading], or [animated-gif].
Questions tagged [android-glide]
2336 questions
39
votes
7 answers
How to load image through byte array using Glide?
I have an image contents byte[] form. But when i load them through Glide then broken images are shown. what I'm doing is shown below.
Glide.with(context)
.load(imageByteArray)
.asBitmap()
.placeholder(R.drawable.ic_broken)
…

Adnan Amjad
- 2,553
- 1
- 20
- 29
38
votes
11 answers
Glide not updating image android of same url?
I have the same url for an image. When I update this image more than one time it shows the previous image. The image and picture version on the server is updated but Glide is not showing the new image.I want to get new image every time and cache it…

Usman Saeed
- 843
- 3
- 9
- 21
37
votes
8 answers
Glide - adding header to request
Is there a method to add a custom header to request when an image is downloaded?
I can use volley or okhttp in Glide.
I tried adding a cookie to the cookiemanager in okhttpclient, but it didn't help.
Is there a method to debug request response in…

tomi
- 381
- 1
- 3
- 3
34
votes
7 answers
Android - How to Load Image by name using Glide
Hi I'm using Glide to load image from my drawable folder and all works fine, this is my code :
Glide.with(this).load(R.drawable.my_drawable_image_name).into(myImageView);
I'm wondering if there is a way to load the image just by name, something…

James
- 1,190
- 5
- 27
- 52
34
votes
5 answers
How to make border for circle cropped image in glide
in default, the image that is cropped by glide has no border I need to have a border in the circle image.

Nima
- 1,892
- 4
- 24
- 32
32
votes
2 answers
Glide : How to find if the image is already cached and use the cached version?
Scenario:
I have a large GIF image which I want to cache the first time user opens the app using Glide - Image Loading and Caching library. After that whenever user opens the app, I want to show the cached version if present. This GIF URL will…

Shobhit Puri
- 25,769
- 11
- 95
- 124
31
votes
4 answers
Save picture to storage using Glide
I'm trying to add a Download feature to my app, I'm using Glide Library to load the pictures from their URL, with the code below, I can save the picture to the device storage, but it's not working as I expected.
new…

Mouaad Abdelghafour AITALI
- 4,007
- 7
- 27
- 54
31
votes
9 answers
Does Glide have a method for loading both PNG and SVG?
I'm using Glide to load some images asynchronously into some of my ImageViews, and I know it can handle images like PNG or JPG as it can handle SVG.
Thing is, As far as I know, the way I load those two kinds of image differs. Like:
Loading "normal"…

Mauker
- 11,237
- 7
- 58
- 76
30
votes
2 answers
Simpletarget is deprecated glide?
SimpleTarget has been deprecated since the earlier update of Glide
Glide.with(getActivity())
.load(uri)
.asBitmap()
.error(R.drawable.no_result)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.into(new…

Holi Boom
- 1,346
- 1
- 12
- 29
30
votes
7 answers
Glide cannot resolve asBitmap()
Why I can't resolve this method while using Glide also I can't resolve .diskstaretegy() :
Glide.with(getActivity())
.load(chalet.profilePhoto)
.asBitmap() <--- cannot resolve this
…
user7913931
27
votes
4 answers
Could not find method kapt() for Glide
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
classpath 'com.android.tools.build:gradle:3.2.0'
classpath…

Rajas47Ashtikar
- 583
- 2
- 6
- 11
26
votes
2 answers
Can I load images synchronously with Glide?
I know it isn't very practical to load bitmaps from the device storage synchronously, but I really have to do it. I haven't figured out any way to do this.

Ukubu
- 810
- 1
- 6
- 18
26
votes
3 answers
Glide: load drawable but don't scale placeholder
Is there a way to use Glide to assign a placeholder but keep this image to its original scale?
I have an ImageView with variable size (depending on the incoming image) which I set before calling Glide.with().load().into() and I want to use a…

Fernando
- 362
- 1
- 3
- 9
24
votes
5 answers
Glide callback after success in Kotlin
private SimpleTarget target = new SimpleTarget() {
@Override
public void onResourceReady(Bitmap bitmap, GlideAnimation glideAnimation) {
// do something with the bitmap
// for demonstration purposes, let's just…

Than Htike Aung
- 261
- 1
- 2
- 5
23
votes
4 answers
Glide 4.3.1: how to use error()?
First, what is the difference between Glide and GlideApp? The latter seems to be automatically generated, but the steps seemed to be complicated so I used Glide instead. They both seem to have the same methods.
So, I used…

Damn Vegetables
- 11,484
- 13
- 80
- 135