-1
日增长
-1
周增长
-1
月增长
35,010
stars
6,168
forks
1,032
watchers
1,227
prs
4,533
issues
59
releases
README
Glide
=====
| [View Glide's documentation][20] | [简体中文文档][22] | [Report an issue with Glide][5]
Glide is a fast and efficient open source media management and image loading framework for Android that wraps media
decoding, memory and disk caching, and resource pooling into a simple and easy to use interface.
!
Glide supports fetching, decoding, and displaying video stills, images, and animated GIFs. Glide includes a flexible API
that allows developers to plug in to almost any network stack. By default Glide uses a custom HttpUrlConnection based
stack, but also includes utility libraries plug in to Google's Volley project or Square's OkHttp library instead.
Glide's primary focus is on making scrolling any kind of a list of images as smooth and fast as possible, but Glide is
also effective for almost any case where you need to fetch, resize, and display a remote image.
Download
--------
For detailed instructions and requirements, see Glide's [download and setup docs page][28].
You can download a jar from GitHub's [releases page][1].
Or use Gradle:
gradle
repositories {
google()
mavenCentral()
}
dependencies {
implementation 'com.github.bumptech.glide:glide:5.0.9'
}
Or Maven:
xml
com.github.bumptech.glide
glide
5.0.9
For info on using the bleeding edge, see the [Snapshots][17] docs page.
R8 / Proguard
--------
The specific rules are already bundled into the aar which can be interpreted by R8 automatically
How do I use Glide?
-------------------
Check out the [documentation][20] for pages on a variety of topics, and see the [javadocs][3].
For Glide v3, see the [wiki][2].
Simple use cases will look something like this:
java
// For a simple view:
@Override public void onCreate(Bundle savedInstanceState) {
...
ImageView imageView = (ImageView) findViewById(R.id.my_image_view);
Glide.with(this).load("https://goo.gl/gEgYUd").into(imageView);
}
// For a simple image list:
@Override public View getView(int position, View recycled, ViewGroup container) {
final ImageView myImageView;
if (recycled == null) {
myImageView = (ImageView) inflater.inflate(R.layout.my_image_view, container, false);
} else {
myImageView = (ImageView) recycled;
}
String url = myUrls.get(position);
Glide
.with(myFragment)
.load(url)
.centerCrop()
.placeholder(R.drawable.loading_spinner)
.into(myImageView);
return myImageView;
}
Status
------
Version 4 is now released and stable. Updates are released periodically with new features and bug fixes.
Comments/bugs/questions/pull requests are always welcome! Please read [CONTRIBUTING.md][5] on how to report issues.
Compatibility
-------------
Minimum Android SDK: Glide v4 requires a minimum API level of 23.
Compile Android SDK: Glide v4 requires you to compile against API 26 or later.
If you need to support older versions of Android, consider staying on [Glide v3][14], which works on API 10, but is not actively maintained.
OkHttp 3.x: There isTop issues
#2471GIFs animate slowly with Glide 4.256 comments · 2017-10-11#232I want to show the loading progress with the image48 comments · 2014-11-05#363crossFade messes up aspect ratio for thumbnail/placeholder36 comments · 2015-03-06#571Support of WebP format (incl. animations) where not natively available29 comments · 2015-08-06#4174The huawei p30 or p30 pro Android 10 is particularly slow to load images, requiring a long wait before they are displayed or not displayed28 comments · 2020-04-09#4461why set 'DecodeFormat.PREFER_RGB_565' is failed? this problem will use too much native memory。26 comments · 2021-01-04#746Help implementing Pinning images23 comments · 2015-11-16#4476Getting this Warming.22 comments · 2021-01-19
Latest release
Glide v5.0.9 v5.0.9 2026-07-11Removed extra . from version name.