HowTo: Getting Started With Glide

Glide is one of the most used image loading library in the world of android applications. It is well tested, provides a number of features and is fast and optimized.

Step 1:

To get started add Glide to your project dependency. Add the following lines to build.gradle file. Please check the latest version here and make the necessary adjustments.

dependencies {
    // your app's other dependencies
    implementation 'com.github.bumptech.glide:glide:4.5.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.5.0'

Step 2:

Give internet permissions to your application if the image is on a remote location. Add the following lines to AndroidManifest.xml file.

    ... >
    // this line
    <uses-permission android:name="android.permission.INTERNET" />

Step 3:

Add the following lines to the layout.xml file.


Step 4:

Finally, add the following lines to the file

ImageView imageView = (ImageView) findViewById(;

Placeholder is the image that will be displayed while the requested image is being loaded. Placeholder is optional and can be excluded.

Step 5:

That is all, now build and run the application.

If there are any questions let me know in the comments below. Check out the HowTo for Picasso and Fresco as well.

Show Comments