Skip to content
A Glide WebpDecoder Intergration Library for decoding and displaying webp images
C Java C++ Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
scripts release 0.0.5 to support glide 4.2 Feb 6, 2018
webpsample fix some broken webp frame decode error Sep 12, 2019
.gitignore submit glide webpdecode library and release 0.0.1 Dec 13, 2017
LICENSE update LICENSE Dec 31, 2017
build.gradle fix #34 sync WebpFrameLoader code comparison with GifFrameLoader Feb 16, 2019
gradlew submit glide webpdecode library and release 0.0.1 Dec 13, 2017


license Release Version PRs Welcome

GlideWebpDecoder is a Glide integration library for decoding and displaying webp images on Android platforms. It is based on libwebp project and takes some implementation from Fresco and GlideWebpSupport as references.


  • play animated webp images on all Android versions
  • show transparent or lossless webp images on Android devices lower than 4.2.1 (BitmapFactory support webp decode on 4.2+ android system so we have no need to handle)

Dependency Integration

Library is available in jcenter. If you build with Gradle, just add the following dependencies to your build.gradle file. Different Glide version is corresponding to different GlideWebpDecoder due to the annotation processor compatibility. The version rule of GlideWebpDecoder is "{major_version}.{glide_version}". For example, if you use glide 4.9.0, the corresponding version of GlideWebpDecoder should be

Library will only follow the latest three version of Glide. If you use a lower version glide, please clone the project and modify it yourself.

Glide 4.10.0 migrate to AndroidX, your project must use AndroidX too, webpdeocder with androidX is

Glide 4.7.0 is not available in maven, see issue 3015

Glide 4.6.0 is broken, see issue 2863

def GLIDE_VERSION = "4.10.0"
// webpdecoder
implementation "com.zlc.glide:webpdecoder:1.6.${GLIDE_VERSION}"
// glide 4.6.1~4.10.0 (exclude broken version 4.6.0, 4.7.0)
implementation "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
annotationProcessor "com.github.bumptech.glide:compiler:${GLIDE_VERSION}"

Then you are free to use GlideWebpDecoder just like using other Glide integration library.


Basic usage see Glide API documents

If you want to use BitmapTransformation or library glide-transformations, please use WebpDrawableTransformation to wrap your original BitmapTransformation when loading image with Glide request.

Code Snippet as follow. Run sample project to see other Glide built-in transformation effect.

Transformation<Bitmap> circleCrop = new CircleCrop();
        .optionalTransform(WebpDrawable.class, new WebpDrawableTransformation(circleCrop))


The library use native code to decode webp, so you should put the following lines to your proguard.cfg and keep the jni interface.

-keep public class com.bumptech.glide.integration.webp.WebpImage { *; }
-keep public class com.bumptech.glide.integration.webp.WebpFrame { *; }
-keep public class com.bumptech.glide.integration.webp.WebpBitmapFactory { *; }



The Library is Apache-2.0-licensed, part code is MIT-licensed see Fresco for detail.

You can’t perform that action at this time.