简体   繁体   中英

Unable to load .webp image using Glide in Android

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.

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);

As currently Glide already provide support for .webp images. Please check below open issue on Glide Github repo.

https://github.com/bumptech/glide/issues/571

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM