Skip to main content

Glide: Android Image loader library

Lovell Felix 1 min read

Archive note: the tools and versions have moved on. I have kept this entry because the debugging path and the underlying constraint may still be useful.

The Android community has been buzzing about Glide for the past few weeks (new to a lot of people, though it's actually been around for almost a year, since Google I/O 2014). I tried it last July and didn't see much difference from Picasso, so I stuck with Picasso across my projects.

What changed my mind was a benchmark post on The Cheese Factory showing Glide meaningfully faster and lighter on memory than Picasso.

credit - The Cheese Factory

Performance is one thing, usability is another. I don't like fighting a library to use it: if it's hard to implement, it's not really doing its job. Good news: if you already know Picasso, you're in familiar territory. Both are simple one-liners.

// Picasso
dependencies {
    compile 'com.squareup.picasso:picasso:2.5.1'
}

Picasso.with(context)
    .load("https://lovellfelix.com/images/logo.png")
    .into(imgView);
// Glide
dependencies {
    compile 'com.github.bumptech.glide:glide:3.5.2'
    compile 'com.android.support:support-v4:22.0.0'
}

Glide.with(context)
    .load("https://lovellfelix.com/images/logo.png")
    .into(imgView);

They're nearly identical to use, but Glide is a bit more flexible (that's a topic for another post). Based on the performance gain, switching was worth it.

About the author

Lovell Felix

Infrastructure and reliability engineer working on Linux platforms, configuration delivery, and deployment safety at fleet scale.

@lovellfelix

More notes