Glide ResourceLoader fails to load vector resource
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
**Glide Version**: 4.13.2
**Device/Android Version**: Any/All
**Issue details / Repro steps / Use case background**:
I have a a couple loaders that are used in fallback cases if no previous loader could handle the image. In this case something like this:
```
class FallbackLoader private constructor(
private val resourceLoader: ModelLoader
) : ModelLoader {
override fun buildLoadData(model: Attachment, width: Int, height: Int, options: Options): ModelLoader.LoadData? {
return resourceLoader.buildLoadData(R.drawable.my_icon, width, height, options)
}
```
However if that drawable resource is a vector:
```
...
...
```
Glide fails to load:
2022-05-20 16:31:49.962 22063-22063/mil.nga.giat.mage.debug W/Glide: Load failed for com.test.app@7f90e0[...] with size [948x550]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{AssetInputStream->Object->Drawable}, LOCAL
Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{AssetInputStream->GifDrawable->Drawable}
Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{AssetInputStream->Bitmap->BitmapDrawable}
Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{AssetInputStream->BitmapDrawable->Drawable}
Contributor guide
Assessment
This issue has not been assessed yet.