I am using Glide v3.7.0 to load image. I have no problem in loading .png format. But I dont even receive error response while loading .webp. If I tried to load the same url in browser it getting downloaded as file. And the file can be open via Chrome display the image correctly.
Asked
Active
Viewed 1.0k times
2 Answers
1
As currently Glide
already provide support for .webp
images.
Please check below open issue on Glide Github repo.
-
It looks like webp is supported in glide based on the link you referenced. – dazza5000 Apr 21 '17 at 22:10
-
I am using 3.7.0 glide, do we need to do something extra or webp format is loaded by default? my minimum sdk version is 5 & above. – Hassan Imtiaz Apr 15 '22 at 06:52
0
I'm using GlideWebpDecoder
This library is compatible with Glide version 4.+
And the author is always trying to support with newest version of Glide
This is the code snippet :
Transformation<Bitmap> circleCrop = new CircleCrop();
GlideApp.with(mContext)
.load(url)
.optionalTransform(circleCrop)
.optionalTransform(WebpDrawable.class, new WebpDrawableTransformation(circleCrop))
.into(imageView);

Faruk
- 5,438
- 3
- 30
- 46
-
Hey I stumbled upon this answer and I had a look at the sample app for the library. My use case is such that I do not have `circleCrop` or other transformations right now. How can I load `webp` images from server? For case like mine, the sample app does nothing (see line 103 of `ImageAdapter.java`), does it mean glide supports `webp` by default? It does not seem so for me. Can you help me in anyway? – ravi Jun 23 '20 at 11:18
-
-
@c-an you can see in https://github.com/bumptech/glide/issues/3170 for more explanation about `GlideApp` – Faruk Feb 09 '21 at 14:25